I\'m wondering if this code is safe to get an error of an insert
$db->query("INSERT ........); if($db->error){ ...... }