ezSQL is an open-source PHP database class that features a simplified and concise syntax for calling MySQL, Oracle 8/9, InterBase/FireBird, PostgreSQL, SQL Server, and SQLite / SQLite C++ functions within your PHP script.
ezSQL is an open source PHP database class that makes it ridiculously easy to use MySQL, Oracle 8/9, InterBase/FireBird, PostgreSQL, SQL Server, and SQLite / SQLite C++ within your PHP script.
- It is one PHP file that you include at the top of your script. Then, instead of using standard PHP database functions listed in the PHP manual, you use a much smaller (and easier) set of ezSQL functions.
- It automatically caches query results and allows you to use easy to understand functions to manipulate and extract them without causing extra server overhead
- Most ezSQL functions can return results as objects, associative arrays, or numerical arrays
Examples:
Select multiple records from the database and print them out..
$users = $db->get_results("SELECT name, email FROM users");
foreach ( $users as $user )
{
// Access data using object syntax
echo $user->name;
echo $user->email;
}
Get one variable from the database and print it out..
$var = $db->get_var("SELECT count(*) FROM users");
echo $var;