Re: Mysql Problem

From: Date: Fri, 28 May 2004 11:56:27 +0000
Subject: Re: Mysql Problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-187113@lists.php.net to get a copy of this message
"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

« previous php.general (#187113) next »