how do I fix it so mysql doesn't returns a 0? is my syntax wrong somewhere?

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]
----- Original Message -----
From: "Uma Shankari T." <[EMAIL PROTECTED]>
To: "Alex Behrens" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, March 01, 2002 7:35 PM
Subject: Re: need help debugging!


>
> Hello Alex,
>
>
>   If the mysql query returns 0 then it will display the message like this
>
>
> -Uma
>
>
> On Fri, 1 Mar 2002, Alex Behrens wrote:
>
> AB>Hey All,
> AB>
> AB>I am new to mysql and I need help debugging this peice of code for my
site:
> AB>
> AB><?php
> AB>$db = mysql_connect("db30.pair.com", "net3dual", "rosevilleX1");
> AB>mysql_select_db("rahs",$db);
> AB>$search = mysql_query("SELECT * FROM rahs");
> AB>while($num=mysql_fetch_array($search)) {
> AB>printf ("<div align='center'><center><table border='0' cellpadding='0'
> AB>cellspacing='0' width=\"40%\"><tr><td
> AB>width=\"70%\">Name:%s&nbsp;&nbsp;&nbsp;&nbsp; #%s</td><td
> AB>width=\"30%\">Team: %s</td></tr><tr><td width=\"100%\"
colspan='2'>Penalty:
> AB>%s</td></tr><tr><td width=\"50%\">Groundballs: %s</td><td
> AB>width=\"50%\">Shots: %s</td></tr><tr><td width=\"50%\">Faceoffs
> AB>Won:%s</td><td width=\"50%\">Faceoffs Lost: %s</td></tr><tr><td
> AB>width=\"100%\" colspan='2'><p
>
AB>align='center'>Date:%s</td></tr></table></center></div>",$num["name"],$nu
m["
>
AB>number"],$num["team"],$num["penalty"],$num["groundballs"],$num["shots"],$
num
> AB>["faceoffs_won"],$num["faceoffs_lost"],$num["date"]);
> AB>}
> AB>?>
> AB>
> AB>it says this error:
> AB>Warning: Supplied argument is not a valid MySQL result resource on line
17
> AB>line 17 would be this line:
> AB>while($num=mysql_fetch_array($search)) {
> AB>
> AB>what is wrong with my code?
> AB>
> 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>
> 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

Reply via email to