OK I am new to this all so bare with me as I try to explain it all!
I am following along with a lesson by Cartoonsmart.com and I am making a form that will add information to the database and display it with flash. Submitting went good but I am having trouble with displaying.
I am getting the message:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /..../..../..../...return_Database_Info.php on line 9
&Totalnumber_of_entries=&Query error: Query was empty
Here is my code. I am obviously missing my log in information but besides that, it is my entire code.
<?php
$qResult = mysql_query ("SELECT * FROM commentbook ORDER BY id DESC");
$nRows = mysql_num_rows($qResult);
$rString ="&Totalnumber_of_entries=".$nRows;
for ($i=0; $i< $nRows; $i++){
$row = mysql_fetch_array($qResult);
$rString .=
"&id".$i."=".$row['id'].
"&visitor".$i."=".$row['visitor'].
"&email".$i."=".$row['email'].
"&item".$i."=".$row['item'].
"&comment".$i."=".$row['comment'].
"&time".$i."=".$row['time'];
mysql_query($rString) or die(mysql_error());
}
echo $rString."&";
$result = mysql_query ($query)
or die("Query error: ". mysql_error());
?>
Please help me 🙁