Re: foreign key

From: Date: Tue, 09 Aug 2011 19:31:33 +0000
Subject: Re: foreign key
References: 1 2 3 4 5  Groups: php.db 
Request: Send a blank email to php-db+get-47967@lists.php.net to get a copy of this message
On 9 August 2011 21:23, Chris Stinemetz <chrisstinemetz@gmail.com> wrote: > > > >> > > > > What does your result look like? Hard to say what the problem is > > without seeing the result. > > > > I am echoing the query and printing the get array just for debugging purposes, but below you > can see how it is repeating its' self. > > Thank you So you're saying that SELECT stores.store_subject, stores.store_comments, stores.store_date, stores.store_tptest, stores.store_by, users.user_id, users.user_name, users.first_name, users.last_name FROM stores LEFT JOIN users ON stores.store_by = users.user_id WHERE stores.store_subject = 'Bella Roe 4980 Roe Blvd' ORDER BY stores.store_date DESC returns Chris Stinemetz 08-09-2011 02:08PM 600kbps-3.8mbps test Chris Stinemetz 08-09-2011 02:08PM 600kbps-3.8mbps test Chris Stinemetz 08-09-2011 02:07PM 0-250kbps test1 Chris Stinemetz 08-09-2011 02:07PM 0-250kbps test1 From the above, can't see where your problem is but something in your join is obviously not unique - whether it's the first or second table. -- <hype> WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 </hype>

« previous php.db (#47967) next »