PHP Classes

DB MySQL Prepare Statements: Query MySQL using MySQLi prepared statements

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 147 All time: 9,119 This week: 455Up
Version Licenses PHP version Categories
kems_db_class 1Freely Distributable5PHP 5, Databases
Description 

Author

This class can query MySQL using MySQLi prepared statements.

It provides static functions to connect to a MySQL database and execute different types of queries using prepared statements to take parameters for composed queries.

Currently the class can execut INSERT and UPDATE queries from arrays of parameters, execute arbitrary queries (including supporting joins) using values from a variable list of function of arguments, retrieve the query results into arrays, etc..

Picture of thorr
  Performance   Level  
Name: thorr <contact>
Classes: 1 package by
Country: Romania Romania
Age: ???
All time rank: 428079 in Romania Romania
Week rank: 286 Up4 in Romania Romania Up

Example

<?php
DB
::Init('127.0.0.1','user','password','database'); //connect to the MySQL
DB::GetRow("select * from table where name=? and password=?",$name,$password); //accepts as many parameters as needed (one for every "?")
DB::GetAll("select * from table where field=? or field2=? or field3=?",$f1,$f2,$f2);
DB::Execute("delete from table where field=? or field2=? or field3=?",$f1,$f2,$f2);
print_r(DB::db_log());



  Files folder image Files  
File Role Description
Plain text file DB.class.php Class DB class
Accessible without login Plain text file example.php Example example

 Version Control Unique User Downloads Download Rankings  
 0%
Total:147
This week:0
All time:9,119
This week:455Up