|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Problem with mysql_num_rows
hi, i'm new to php and i was trying out some code from a tutorial and i got an error saying: "Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\calendar2\index.php on line 30"
heres the code: [php] <?php $sql = "SELECT * FROM appointments WHERE month=10 AND day=1;"; $result = mysql_query($sql); $numrows = mysql_num_rows($result); //line 30 if($numrows == 0){ echo "<br>available"; } else{ echo "<br>taken"; } ?> [php] An anyone tell me whats wrong? thanks |
|
#2
|
|||
|
|||
|
Quote:
PHP Code:
Edit, looks like your problem is here,... day=1;";
__________________
-- Jason |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Problem with mysql_num_rows |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|