RE: [PHP-DB] MySQL connection: Change on syntaxis?
| From: | David Balatero | Date: | Fri, 22 Jun 2001 05:35:56 +0000 |
| Subject: | RE: [PHP-DB] MySQL connection: Change on syntaxis? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-9714@lists.php.net to get a copy of this message | ||
$rows = mysql_num_rows($result) should work. If you want to know what's
going on, try doing:
<?php
$rows = mysql_num_rows($result) or die("Error grabbing number of rows. MySQL
said:<p><font color=red>" . mysql_error() . "</font>");
?>
-- David Balatero
-----Original Message-----
From: Tomás García Ferrari [mailto:tgf@bigital.com]
Sent: Thursday, June 21, 2001 2:30 PM
To: PHP List
Subject: [PHP-DB] MySQL connection: Change on syntaxis?
Hello,
I updated php to version 4.0.5 and MySQL to version 2.32.39, had errors on
lines like this:
$rows = mysql_num_rows($result);
and noticed that this is a solution:
$rows = @mysql_num_rows($result);
Is this a new use of the function mysql_num_rows?
+-- --+
Tomás García Ferrari
Bigital
http://bigital.com/
+-- --+
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net