PHP Classes
elePHPant
Icontem

MySQL DB Lib: Connect and run MySQL queries from parameter lists

Recommend this page to a friend!
  Info   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2011-12-28 (4 years ago) RSS 2.0 feedNot enough user ratingsTotal: 682 All time: 4,564 This week: 923Up
Version License PHP version Categories
mysql-lib 1.1GNU General Publi...5Databases
Description Author

This package can connect and run MySQL queries from parameter lists.

There is an interface class that can connect to a MySQL database.

Another class can execute SQL SELECT, INSERT, UPDATE and DELETE queries using parameters that define values for table names, fields, field values, conditions, etc..

Picture of Qazi Umar Aadil Shah
Name: Qazi Umar Aadil Shah <contact>
Classes: 3 packages by
Country: India India

Details
Change the constant values in configuration file.


Usegae:

SELECT.

$argSelectFlds = array('column1','column2');
$argOrderBy = ' order by column name';
$argSearchWhere = 'And where clause';
$varWhereClause = ' 1 '.$argSearchWhere;
$argTables = tableName;
$arrDataList = $objDBConnect->select($argTables, $argSelectFlds, $varWhereClause, $argOrderBy, $argLimit);


UPDATE:

$arrUpdate['column1'] = 'value1';
$arrUpdate['column2'] = 'value2';
$varWhere = ' AND column1= "----';
$affectedRows = $objDBConnect->update(Table Name, $arrUpdate, $varWhere);




INSERT:

$arrUpdate['column1'] = 'value1';
$arrUpdate['column2'] = 'value2';
$affectedRows = $objDBConnect->insert(Table Name, $arrUpdate);


Get Num Rows

return $objDBConnect->getNumRows(tableName, 'unique id of table', Condition);
  Files folder image Files  
File Role Description
Plain text file class_database_dbl.php Class Database Class
Plain text file class_db_connection Class class_db_connection
Plain text file DB_Interface Class DB Interface
Plain text file configure.inc Conf. configure.inc
Plain text file connectdb.inc Example connectdb.inc
Plain text file Readme Doc. Readme

 Version Control Unique User Downloads Download Rankings  
 0%
Total:682
This week:0
All time:4,564
This week:923Up