Re: PHP/MySql Help
| From: | Edmond Baroud | Date: | Wed, 09 Apr 2003 21:53:23 +0000 |
| Subject: | Re: PHP/MySql Help | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-143223@lists.php.net to get a copy of this message | ||
On Wed, 9 Apr 2003 17:48:03 -0400
Edmond Baroud <SoHo@admin.fido.ca> wrote:
> On Wed, 9 Apr 2003 17:35:38 EDT
> UGADawgs6910@aol.com wrote:
>
> > Thanks for the help, but it still isn't working... I am not sure exactly of
> > the problem, the thing is I am getting no error messages I am just not
> > getting any of the variables back below... it is getting past the connect
> > phase, and I tested out the query in PHPMyAdmin and it works. I've checked it
> > over and over so I have no idea. I suppose the error must be in these lines:
> >
> > $insert = mysql_result($query or die ('im a piece'));
> should be:
> $insert = mysql_query($query) or die ('im a piece'));
got confused here..
I thought that your $query = "select foo from bar";
if you have already done your mysql_query("select foo from bar"); then $insert should
mysql_result($query);
Ed.
>
> > $number = MYSQL_NUM_ROWS($query);
> and replace $query with $insert for above:
> $number = MYSQL_NUM_ROWS($insert);
>
> > if($number != 0) {
> >
> > $i = 0;
> > $ordernumber = mysql_result($insert,$i,"ordernumber");
> > $emailaddy = mysql_result($insert,$i,"emailaddy");
> > }
> > or down here:
> > if($number != 0) {echo ("<table DEFANGED_border='\"0\"'
> > DEFANGED_cellpadding='\"2\"'
> > cellspacing=\"0\" style=\"border-collapse: collapse\"
> > width=\"100%\">
> > <tr>
> > <td DEFANGED_width='\"100%\"'
> > DEFANGED_bgcolor='\"#003366\"'
> > DEFANGED_colspan='\"6\"'><font
> > DEFANGED_color='\"#FFFFFF\"'>
> > $name -
> > $emailaddy: Order Number: $ordernumber</font></td>.....
> >
> > Thanks for the help, I wish I had more info to give you about the error. I
> > know that $number is being returned as 0, if that helps at all. Thanks guys
> >
> > -Daniel
> >
>
>
> --
> Edmond Baroud
> Senior UNIX sysadmin mailto:SoHo@admin.fido.ca
> Fingerprint 140F 5FD5 3FDD 45D9 226D 9602 8C3D EAFB 4E19 BEF9
> "UNIX is very user friendly, it's just picky about who its friends are."
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
Edmond Baroud
Senior UNIX sysadmin mailto:SoHo@admin.fido.ca
Fingerprint 140F 5FD5 3FDD 45D9 226D 9602 8C3D EAFB 4E19 BEF9
"UNIX is very user friendly, it's just picky about who its friends are."