At 9:05 AM +0100 6/22/01, Russ Michell wrote:
> > Is this a new use of the function mysql_num_rows?
>No!.
It's not a change in syntax, but it is a change in PHP's behavior.
In PHP 4, mysql_num_rows() and mysql_num_fields() will issue error
messages if the argument is not a result set. In PHP 3
> Is this a new use of the function mysql_num_rows?
No!
You can use the @ to 'suppress error messages' that may reveal
delicate information to users such as paths to directories on your
server. It can be preppended to almost any php function likely to
result in an error, if used incorrectly.
Hi,
the '@' is an error control operator avaialble in all php versions. When
prepended to an expression in PHP, any error messages that might be
generated by that expression will be ignored.
Check the PHP Manual for more info.
Dobromir Velev
-Original Message-
From: Tomás García Ferrari
$rows = mysql_num_rows($result) should work. If you want to know what's
going on, try doing:
" . mysql_error() . "");
?>
-- David Balatero
-Original Message-
From: Tomás García Ferrari [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 2:30 PM
To: PHP List
Subject: [PHP-DB] MySQL
on 6/21/01 2:30 PM, Tomás García Ferrari at [EMAIL PROTECTED] wrote:
> 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 t
Tomás García Ferrari pressed the little lettered thingies in this order...
> 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_ro