Hi, I wonder if someone could point out what is wrong with the following piece of code (taken directly from the 'PHP - fast & easy web development' book) , which gives the following warning :
Warning: Supplied argument is not a valid MySQL result resource in c:\program files\apache group\apache\htdocs\cms\pick_modcontact.php on line 23 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= $result = mysql_query($sql,$connection); <--line 23 while ($row = mysql_fetch_array($result)) { $id = $row['id']; $fname = $row['fname']; $lname = $row['lname']; $option_block .= "<option value=\"$id\">$lname, $fname</option>"; } -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The mySQL query that is executed returns a result set when I use the mySQL shell, and the connection string is valid. If someone could advise me as to the error, I would greatly appreciate it. - Best regards, Lee -- PHP General 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]