Hello Alex,
Check it manually wheather ur query returns any row..... -Uma On Fri, 1 Mar 2002, Alex Behrens wrote: AB>how do I fix it so mysql doesn't returns a 0? is my syntax wrong somewhere? AB> AB>Thanks! AB>-------------------------------------------- AB>-Alex "Big Al" Behrens AB>E-mail: [EMAIL PROTECTED] AB>Urgent E-mail: [EMAIL PROTECTED] (Please be brief!) AB>Phone: 651-482-8779 AB>Cell: 651-329-4187 AB>Fax: 651-482-1391 AB>ICQ: 3969599 AB>Owner of the 3D-Unlimited Network: AB>http://www.3d-unlimited.com AB>Send News: AB>[EMAIL PROTECTED] AB>----- Original Message ----- AB>From: "Uma Shankari T." <[EMAIL PROTECTED]> AB>To: "Alex Behrens" <[EMAIL PROTECTED]> AB>Cc: <[EMAIL PROTECTED]> AB>Sent: Friday, March 01, 2002 7:35 PM AB>Subject: Re: need help debugging! AB> AB> AB>> AB>> Hello Alex, AB>> AB>> AB>> If the mysql query returns 0 then it will display the message like this AB>> AB>> AB>> -Uma AB>> AB>> AB>> On Fri, 1 Mar 2002, Alex Behrens wrote: AB>> AB>> AB>Hey All, AB>> AB> AB>> AB>I am new to mysql and I need help debugging this peice of code for my AB>site: AB>> AB> AB>> AB><?php AB>> AB>$db = mysql_connect("db30.pair.com", "net3dual", "rosevilleX1"); AB>> AB>mysql_select_db("rahs",$db); AB>> AB>$search = mysql_query("SELECT * FROM rahs"); AB>> AB>while($num=mysql_fetch_array($search)) { AB>> AB>printf ("<div align='center'><center><table border='0' cellpadding='0' AB>> AB>cellspacing='0' width=\"40%\"><tr><td AB>> AB>width=\"70%\">Name:%s #%s</td><td AB>> AB>width=\"30%\">Team: %s</td></tr><tr><td width=\"100%\" AB>colspan='2'>Penalty: AB>> AB>%s</td></tr><tr><td width=\"50%\">Groundballs: %s</td><td AB>> AB>width=\"50%\">Shots: %s</td></tr><tr><td width=\"50%\">Faceoffs AB>> AB>Won:%s</td><td width=\"50%\">Faceoffs Lost: %s</td></tr><tr><td AB>> AB>width=\"100%\" colspan='2'><p AB>> AB>AB>align='center'>Date:%s</td></tr></table></center></div>",$num["name"],$nu AB>m[" AB>> AB>AB>number"],$num["team"],$num["penalty"],$num["groundballs"],$num["shots"],$ AB>num AB>> AB>["faceoffs_won"],$num["faceoffs_lost"],$num["date"]); AB>> AB>} AB>> AB>?> AB>> AB> AB>> AB>it says this error: AB>> AB>Warning: Supplied argument is not a valid MySQL result resource on line AB>17 AB>> AB>line 17 would be this line: AB>> AB>while($num=mysql_fetch_array($search)) { AB>> AB> AB>> AB>what is wrong with my code? AB>> AB> AB>> AB> AB>> AB>Thanks! AB>> AB>-------------------------------------------- AB>> AB>-Alex "Big Al" Behrens AB>> AB>E-mail: [EMAIL PROTECTED] AB>> AB>Urgent E-mail: [EMAIL PROTECTED] (Please be brief!) AB>> AB>Phone: 651-482-8779 AB>> AB>Cell: 651-329-4187 AB>> AB>Fax: 651-482-1391 AB>> AB>ICQ: 3969599 AB>> AB>Owner of the 3D-Unlimited Network: AB>> AB>http://www.3d-unlimited.com AB>> AB>Send News: AB>> AB>[EMAIL PROTECTED] AB>> AB> AB>> AB> AB>> AB>--------------------------------------------------------------------- AB>> AB>Before posting, please check: AB>> AB> http://www.mysql.com/manual.php (the manual) AB>> AB> http://lists.mysql.com/ (the list archive) AB>> AB> AB>> AB>To request this thread, e-mail <[EMAIL PROTECTED]> AB>> AB>To unsubscribe, e-mail AB><[EMAIL PROTECTED]> AB>> AB>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php AB>> AB> AB>> AB>> -- AB>> AB>> Love and you shall be loved by others AB>> AB>> AB> AB> AB>--------------------------------------------------------------------- AB>Before posting, please check: AB> http://www.mysql.com/manual.php (the manual) AB> http://lists.mysql.com/ (the list archive) AB> AB>To request this thread, e-mail <[EMAIL PROTECTED]> AB>To unsubscribe, e-mail <[EMAIL PROTECTED]> AB>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php AB> -- Love and you shall be loved by others --------------------------------------------------------------------- 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