Re: Odp: [PHP-DB] Best way to check if a query succeeded

2001-03-29 Thread Hans-Werner Guth
We do it this way (code snippet) ... $dbqueryline = mysql_db_query ($mredatabase, "select vorgang, bezeichnung from mrebewkennz order by vorgang", $dbhandle); if (mysql_errno() != 0) { echo mysql_error(); echo "\n"; } else { $bewkenznzahl = mysql_num_rows($dbqueryline); print

Re: [PHP-DB] Best way to check if a query succeeded

2001-03-29 Thread Doug Semig
I see you there's been lots of responses already, but there's an important related bit of news folks might want to know. Everyone who uses the mysql_affected_rows() should know that a bug was fixed in 3.23.36 that evidentally reports affected rows incorrectly if MySQL was compiled without

[PHP-DB] Best way to check if a query succeeded

2001-03-29 Thread Jordan Elver
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? I normally do something like: $sql = "SELECT something FROM table"; $result = mysql_query($sql); if(@mysql_num_rows($result)