Re: [PHP-DB] MySQL connection: Change on syntaxis?

2001-06-29 Thread Paul DuBois

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 they didn't
seem to do this.  This may account for the new error messages after
updating PHP.


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.

Russ

On Thu, 21 Jun 2001 23:30:03 +0200 Tom=?ISO-8859-1?B?4XMgR2FyY+0=?=a
Ferrari [EMAIL PROTECTED] wrote:

  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 FerrariBigital
 http://bigital.com/ +--
  --+



  --
  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]


#---#

   Believe nothing - consider everything

   Russ Michell
   Anglia Polytechnic University Webteam

   e: [EMAIL PROTECTED]
   w: www.apu.ac.uk/webteam
   t: +44 (0)1223 363271 x 2331

   www.theruss.com

#---#


--
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]


--
Paul DuBois, [EMAIL PROTECTED]

--
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]




Re: [PHP-DB] MySQL connection: Change on syntaxis?

2001-06-22 Thread Christopher Ostmo

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_rows($result);
 
 Is this a new use of the function mysql_num_rows?
 

The only thing that the @ does is to supress errors.
http://www.php.net/manual/en/language.operators.errorcontrol.php

What's your code and the error(s) you're getting? mysql_num_rows still 
has identical syntax as it did in PHP3.

Christopher Ostmo
a.k.a. [EMAIL PROTECTED]
AppIdeas.com
Meeting cutting edge dynamic
web site needs

For a good time,
http://www.AppIdeas.com/

-- 
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]




Re: [PHP-DB] MySQL connection: Change on syntaxis?

2001-06-22 Thread Paul Burney

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 this a new use of the function mysql_num_rows?

What are the error messages you get?  The @ symbol suppresses warning
messages being sent to the browser so it isn't fixing whatever the real
problem is.

Sincerely,

Paul Burney

++
Paul Burney
Webmaster  Open Source Developer
UCLA - GSEIS - ETU
(310) 825-8365
[EMAIL PROTECTED]
http://www.gseis.ucla.edu/
++



--
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]




RE: [PHP-DB] MySQL connection: Change on syntaxis?

2001-06-22 Thread David Balatero

$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:pfont color=red . mysql_error() . /font);
?

-- 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 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
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]




Re: [PHP-DB] MySQL connection: Change on syntaxis?

2001-06-22 Thread Dobromir Velev

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 [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Date: Friday, June 22, 2001 7:33 AM
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
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]




Re: [PHP-DB] MySQL connection: Change on syntaxis?

2001-06-22 Thread Russ Michell

 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.

Russ

On Thu, 21 Jun 2001 23:30:03 +0200 Tom=?ISO-8859-1?B?4XMgR2FyY+0=?=a 
Ferrari [EMAIL PROTECTED] wrote:

 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 FerrariBigital
http://bigital.com/ +-- 
 --+
 
 
 
 -- 
 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]
 

#---#

  Believe nothing - consider everything   
  
  Russ Michell
  Anglia Polytechnic University Webteam
  
  e: [EMAIL PROTECTED]
  w: www.apu.ac.uk/webteam
  t: +44 (0)1223 363271 x 2331

  www.theruss.com

#---#


--
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]




[PHP-DB] MySQL connection: Change on syntaxis?

2001-06-21 Thread Tomás García Ferrari

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]