ternstyle - Web solutions for the happy developer and the disgruntled site owner.

Lehigh Valley Web Design, Lehigh Valley Web Programming, Lehigh Valley Web Hosting, Lehigh Valley Wordpress, PHP Classes, Javascript Libraries, Wordpress Plugins

MySQL PHP Class

This is a very simple class designed to connect with and perform queries on a MySQL database.

Sample Code

$mysql = new mysqlClass($mysql_address,$mysql_username,$mysql_password,
$mysql_database);
$result = $mysql->query('select * from table_name');

The above variable $result will be an associative array of all the database rows the query returned. Which might look something like the following if it were to be printed:

array(1) {
[0] => array(2) {
["id"] => string(4) "1000"
["name"] => string(16) "John Jingle"
}
}

Features

  • Connect to a MySQL server and select a database with one command
  • Perform any type of MySQL query
  • Compile your own queries
  • Access MySQL errors from a global associative array

Current Version

The current version of this software is 3.8.

Requirements

PHP 4.3.0+

Copyright © 2007 Ternstyle Inc., All rights reserved.
Site designed by, well, me.