note 21240 added to function.mysql-query

From: Date: Sat, 04 May 2002 17:09:23 +0000
Subject: note 21240 added to function.mysql-query
Groups: php.notes 
Request: Send a blank email to php-notes+get-30187@lists.php.net to get a copy of this message
This is my function I have built into my "custom library" I use everywhere. Purpose: Evaluate SQL QUERY that is passed to function and handle error's without killing off PHP with fatal error. function mysql_query_eval($sql) { $mysql_eval_result = mysql_query($sql) or $mysql_eval_error = mysql_error(); if ($mysql_eval_error) { print "mysql_error: $mysql_eval_error\n"; return FALSE; } else { return $mysql_eval_result; } } -- http://www.php.net/manual/en/function.mysql-query.php http://master.php.net/manage/user-notes.php?action=edit+21240 http://master.php.net/manage/user-notes.php?action=delete+21240 http://master.php.net/manage/user-notes.php?action=reject+21240

« previous php.notes (#30187) next »