On Thursday 29 March 2001 13:00, you wrote:
> Hi,
> i was just wondering what you guys do to check if a wquery suceeded or
> not? I know about mysql_num_rows() and mysql_affected_rows(), just
> wondered what you guys do?
Check the return code of mysql_query(). The only safe method.
--
Christian
What about:
$sql = "SELECT something FROM table";
$result = mysql_query($sql) or die ("Query failed!");
do_something(); //the query has succeeded if we get to this line
HTH
Jon
-Original Message-
From: Jordan Elver [mailto:[EMAIL PROTECTED]]
Sent: 29 March 2001 12:00
To: PHP Database
2 matches
Mail list logo