Hey All, I am new to mysql and I need help debugging this peice of code for my site:
<?php $db = mysql_connect("db30.pair.com", "net3dual", "rosevilleX1"); mysql_select_db("rahs",$db); $search = mysql_query("SELECT * FROM rahs"); while($num=mysql_fetch_array($search)) { printf ("<div align='center'><center><table border='0' cellpadding='0' cellspacing='0' width=\"40%\"><tr><td width=\"70%\">Name:%s #%s</td><td width=\"30%\">Team: %s</td></tr><tr><td width=\"100%\" colspan='2'>Penalty: %s</td></tr><tr><td width=\"50%\">Groundballs: %s</td><td width=\"50%\">Shots: %s</td></tr><tr><td width=\"50%\">Faceoffs Won:%s</td><td width=\"50%\">Faceoffs Lost: %s</td></tr><tr><td width=\"100%\" colspan='2'><p align='center'>Date:%s</td></tr></table></center></div>",$num["name"],$num[" number"],$num["team"],$num["penalty"],$num["groundballs"],$num["shots"],$num ["faceoffs_won"],$num["faceoffs_lost"],$num["date"]); } ?> it says this error: Warning: Supplied argument is not a valid MySQL result resource on line 17 line 17 would be this line: while($num=mysql_fetch_array($search)) { what is wrong with my code? Thanks! -------------------------------------------- -Alex "Big Al" Behrens E-mail: [EMAIL PROTECTED] Urgent E-mail: [EMAIL PROTECTED] (Please be brief!) Phone: 651-482-8779 Cell: 651-329-4187 Fax: 651-482-1391 ICQ: 3969599 Owner of the 3D-Unlimited Network: http://www.3d-unlimited.com Send News: [EMAIL PROTECTED] --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php