GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 18-May-2004, 01:31
bananatji bananatji is offline
New Member
 
Join Date: May 2004
Posts: 3
bananatji is on a distinguished road

mysql_num_rows


mysql_num_rows problem...
how do i deal with it...?


Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\Program Files\Apache Group\Apache2\htdocs\phpmysqlconnect\results.php on line 35
  #2  
Old 18-May-2004, 04:52
eRIC eRIC is offline
Awaiting Email Confirmation
 
Join Date: Nov 2003
Location: Kyrgyzstan
Posts: 31
eRIC is on a distinguished road
Post

PHP Code:

$sql="select IdYil,Yil from lkpyil";
$result=mysql_query($sql);
if(!$result)
{
  print "<img src=\"./images/failed.gif\" border=\"0\" alt=\" Hata \">";
  echo "<H2>Hata!</H2>\n";
  echo mysql_errno().":  ".mysql_error()."<P>";
}
$rows=mysql_num_rows($result); 




This works fine. try like this
Last edited by JdS : 18-May-2004 at 05:53. Reason: Please enclose PHP code in [php] & [/php] for syntax highlighting
 
 

Recent GIDBlogAccepted for Ph.D. program by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 13:40.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.