PHP Classes
elePHPant
Icontem

IDatabase class: MySQL Database access wrapper using MySQLi

Recommend this page to a friend!
  Info   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2014-03-06 (3 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 255 All time: 7,527 This week: 607Up
Version License PHP version Categories
idatabase-class 1.0GNU General Publi...5PHP 5, Databases
Description Author

This class is a MySQL Database access wrapper using MySQLi. It can:

- Connect to a MySQL server
- Get MySQL server statistics
- Execute a SELECT SQL query and return all the results into an array
- Execute SQL INSERT, UPDATE and DELETE queries given the SQL query
- Execute SQL INSERT or UPDATE queries given the table name, the list of field names and values
- Get the number of records in a table that match a given condition
- Get a single field or a single row of a table that matches a condition

  Performance   Level  
Name: Nemeth Zoltan <contact>
Classes: 8 packages by
Country: Hungary Hungary
Innovation award
Innovation award
Nominee: 2x

Winner: 1x

Details
URGENT!
 > First you need change the database access data in IDatabase.class.php line 14 to 17!

-- Sample MySQL table

CREATE TABLE IF NOT EXISTS `sample` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `name` varchar(255) NOT NULL,
  `counter` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;

INSERT INTO `sample` (`id`, `date`, `name`, `counter`) VALUES
(1, '2014-03-06 15:45:11', 'test1', 0),
(2, '2014-03-06 15:45:16', 'test2', 0),
(3, '2014-03-06 15:45:21', 'tester1', 0),
(4, '2014-03-06 15:45:27', 'tester2', 0),
(5, '2014-03-06 15:45:34', 'tester3', 0);
  Files folder image Files  
File Role Description
Plain text file EException.class.php Class The exception class for IDatabase class
Plain text file IDatabase.class.php Class The base class file
Accessible without login Plain text file index.php Example Example script fro IDatabase class use
Accessible without login Plain text file readme.txt Doc. Sample table create script for example
Accessible without login Plain text file sample_output.txt Output Sample output

 Version Control Reuses Unique User Downloads Download Rankings  
 0%1
Total:255
This week:0
All time:7,527
This week:607Up