Reply to error using mysql_num_rows( )

Your name:

Reply:


Posted by Fish44 on 03/23/06 17:01

Ive got the following code which works great on my localserver, but
when i upload it to my service provider i get an error

"Warning: mysql_num_rows(): supplied argument is not a valid MySQL
result resource in /opt2/home3/mitas/public_html/register.php on line
86

It seems to be only this function mysql_num_rows() causing a problem,
and the rest of the code works ok, and it adds data correctly.

I have checked with the provider, and they are using
PHP 4.3.10
mySQL 4.0.26

While im using
PHP 5.12
mySQL 5.0.15

Im wondering is this function supported by the older versions ?
Or any other ideas.

CODE------------------------------------------------------------
82 $conn=@mysql_connect( "myServer", "myUser", "myPassword" ) or die(
"Err:Conn" );
83 $rs = @mysql_select_db( "myDatabase", $conn) or die( "Err:Db" );

84 $sql="SELECT eMail FROM tblusers WHERE eMail=\"$eMail\" ";
85 $rs=mysql_query($sql,$conn);
86 $mRecLen=mysql_num_rows($rs);
87 if ($mRecLen>=1) {
88 exit("Sorry,the record exists try another" );
89 }

END CODE----------------------------------------------------



Thanks
Fish44

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация