//define('KJW_STDLOG', fopen('/tmp/debug_log', 'w')); // uncomment to get debug log
require_once 'KjwSql.php';
$db = kjwsql_from_url('mysql://user:pass@host/database');
$db->insertArray('mytable', array('string_column', 'somestring', 'int_column', 1234));
echo $db->insertId();
This does the following behind the scenes:
ini_set('date.timezone', 'Europe/Amsterdam'); // only set this if not set in config already
error_reporting(E_ALL | E_STRICT); // optional, depends on your config
define('KJW_EMAIL_ERRORS_TO', 'your-email@example.com'); // don't define this if you want your errors on display
require_once 'KjwLib.php';
$x = $undefined_variable; // <-- THIS TRIGGERS AN ERROR
This makes sure that you get a pretty backtrace about where you're referencing $undefined_variable before it was set, either by mail or on display.
1.5.8