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,120 This week: 455Up
Version Licenses PHP version Categories
kems_db_class 1Freely Distributable5PHP 5, Databases


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: 271 Up5 in Romania Romania Up


::Init('','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);

  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  
This week:0
All time:9,120
This week:455Up