RE: [PHP] Order by

From: Date: Wed, 04 Aug 2004 02:30:15 +0000
Subject: RE: [PHP] Order by
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-192656@lists.php.net to get a copy of this message
Thank you - stupid me -----Original Message----- From: Wesley Furgiuele [mailto:wesley@furgiuele.net] Sent: Tuesday, August 03, 2004 10:27 PM To: Karl-Heinz Schulz Cc: php-general@lists.php.net Subject: Re: [PHP] Order by Looks like you just forgot some quotes: $specs_query = mysql_query( "select title, information from spec where product=".$id." order by id asc" ); Or just move your quotes to the end -- I think you should be fine: $specs_query = mysql_query( "select title, information from spec where product = $id order by id asc" ); Wes On Aug 3, 2004, at 10:19 PM, Karl-Heinz Schulz wrote: > How can I use the "Order" statement for this query? > > $specs_query = mysql_query("select title, information from spec where > product=".$id); > > I tried to use > > $specs_query = mysql_query("select title, information from spec where > product=".$id order by id asc); > > But it will create the error. > > Parse error: parse error, unexpected T_STRING in > /www/docs/view_product.php > on line 144 > > What am I doing wrong? > > TIA > > Karl-Heinz > > Tracking #: 28B73BEA7EBF0B4D89E64E5EA406BF5EC2EA6912 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#192656) next »