RE: [PHP] Looking for a little MySQL help as well

From: Date: Mon, 12 Jul 2010 19:37:01 +0000
Subject: RE: [PHP] Looking for a little MySQL help as well
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-306847@lists.php.net to get a copy of this message
> -----Original Message----- > From: Phillip Baker [mailto:phillip@freewolf.net] > Sent: Monday, July 12, 2010 11:36 AM > To: Jim Lucas > Cc: PHP General List > Subject: Re: [PHP] Looking for a little MySQL help as well > > Thanks Jim, > > This outputs 2 results. > Is there a way to get the one result set per product regardless of the number > of categories associated with the product, yet displaying all the categories > associated with said prodcut? > > Blessed Be > > Phillip > <snip> Phillip, What you're asking for requires the use of (IIRC) 'cursors'. I don't know if MySQL's meaning/usage of 'cursors' is the same as MSSQL. Either way, you'll need to write some serious (read pain in the a**) Stored Procedure (SP). You're better off implementing that in PHP loop containing 'if' since you're not a DBA ;). Regards, Tommy

« previous php.general (#306847) next »