RE: [PHP] Re: Mysql Problem
| From: | Ian Barnes | Date: | Fri, 28 May 2004 11:58:13 +0000 |
| Subject: | RE: [PHP] Re: Mysql Problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-187114@lists.php.net to get a copy of this message | ||
Hi,
Yes that was my mistake. But even with the code, it still doesnt display the
last one. If i didnt put a " it wouldnt work at all.
Thanks,
Ian
-----Original Message-----
From: Torsten Roehr [mailto:roehr@zilleon.com]
Sent: 28 May 2004 13:56
To: php-general@lists.php.net
Subject: [PHP] Re: Mysql Problem
"Ian Barnes" <ian@cerebellum.za.net> wrote in message
news:MCEPJGOLNMDECGFDOHBKEEJLDCAA.ian@cerebellum.za.net...
> Hi,
>
> I am generating a mysql statement and then printing it to a formatted
field.
> Here is my code:
>
> $sql="SELECT * from tablename where name in
> ('Web','HTML','PHP') group by
> name;
You are missing the closing quote here!
Please set your error reporting to E_ALL while developing:
ini_set('error_reporting', E_ALL);
Regards, Torsten Roehr
> $mysql_rslt1 = mysql_query($sql, $mysql_bconn)
> or die ("Could not get data");
> while ($rec1 = mysql_fetch_array ($mysql_rslt1)) {
> echo "some stuff here";
> }
>
> Now the problem is it will leave out the last line of the reply. So it
would
> leave out the 'PHP' line for the query above. Always the last line, and if
> for some reason i only have 1 in my query, it displays nothing, although
if
> I do it manually using the mysql prompt, it works fine, and i get back the
> info I want. All the other lines format properly and the info is correct,
> just the last line doesnt display.
>
> Any ideas ?
>
> Ian
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php