ZIM BASE - Database Simplified
ZIM Base lets you easily query MySQL database tables with PHP.
It runs MySQLi prepared statements for security at about 1/3 the size of MySQLi.
Parameters are in (light), commands are in red, secondary commands are in grey.
These are followed by ZIM Base result properties where applicable.
Get the ZIP FILE
CONNECT
require_once('zim_base.php');
if ($base->error) {echo "error connecting"; exit;}
VARIABLES - (name1, name2, etc.)
$base->makeVars("id", "data");
This method makes global variables from GET or POST.
Note: if using ZIM Bind see $base->simplify() in zim_bind.php internal docs
In this case we have:
$id: "123"
$data: "my GET content"
Fatal error: Uncaught mysqli_sql_exception: Duplicate entry '123' for key 'PRIMARY' in /home/danzen/public_html/code/base/zim_base.php:562
Stack trace:
#0 /home/danzen/public_html/code/base/zim_base.php(562): mysqli_stmt->execute()
#1 /home/danzen/public_html/code/base/commands.php(129): ZIM_Base->insert('zim_base', Array)
#2 {main}
thrown in /home/danzen/public_html/code/base/zim_base.php on line 562