imvkmark
9/16/2013 - 2:18 PM

phpclass:ezsql

phpclass:ezsql

$db->get_results - get multiple row result set from the database (or previously cached results) $db->get_row -- get one row from the database (or previously cached results) $db->get_col - get one column from query (or previously cached results) based on column offset $db->get_var -- get one variable, from one row, from the database (or previously cached results) $db->query -- send a query to the database (and if any results, cache them) $db->debug - print last sql query and returned results (if any) $db->vardump - print the contents and structure of any variable $db->select -- select a new database to work with $db->get_col_info - get information about one or all columns such as column name or type $db = new db -- Initiate new db object.

<?php
// Include ezSQL core
include_once "ez_sql_core.php";

// Include ezSQL database specific component (in this case mySQL)
include_once "ez_sql_mysql.php";

// Initialise database object and establish a connection
// at the same time - db_user / db_password / db_name / db_host
$db = new ezSQL_mysql('db_user','db_password','db_name','db_host');

$db->query("set names utf8");