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 support for transactions. Go to
http://www.mysql.com/documentation/mysql/bychapter/manual_News.html and
scroll down to section F.2.2. It's the 8th item in the list.
So shy away depending on mysql_affected_rows() for anything unless you're
absolutely sure you're running at least 3.23.36 or have transaction support
compiled in.
Doug
At 12:00 PM 3/29/01 +0100, Jordan Elver 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?
>
>I normally do something like:
>
>$sql = "SELECT something FROM table";
>$result = mysql_query($sql);
>if(@mysql_num_rows($result) > 0) {
> echo'Query Suceeded';
>} else {
> echo'Query failed';
>}
>
>Cheers,
>
>Jord
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]