On Aug 9, 2011, at 3:41 PM, Peter Lind wrote:
On 9 August 2011 22:38, Chris Stinemetz
wrote:
Yes, debug your code and figure out why it's looping twice instead.
For instance, try the other query in the mysql console.
Thank you! It was the first query. I put a LIMIT 1 on it and now it
i
On 9 August 2011 22:38, Chris Stinemetz wrote:
>>
>> Yes, debug your code and figure out why it's looping twice instead.
>> For instance, try the other query in the mysql console.
>>
>
> Thank you! It was the first query. I put a LIMIT 1 on it and now it is
> working correctly. I appreciate your h
>
> Yes, debug your code and figure out why it's looping twice instead.
> For instance, try the other query in the mysql console.
>
Thank you! It was the first query. I put a LIMIT 1 on it and now it is
working correctly. I appreciate your help!
Thank you,
Chris
--
PHP Database Mailing List (h
On 9 August 2011 22:25, Chris Stinemetz wrote:
>>
>> Your php code had more than one query running (one inside the other).
>> It's the outer query that runs twice, not the inner one returning
>> double the results
>>
>
>
> Thanks Peter,
>
> Do you have any suggestions on how to fix this?
>
> Thank
>
> Your php code had more than one query running (one inside the other).
> It's the outer query that runs twice, not the inner one returning
> double the results
>
Thanks Peter,
Do you have any suggestions on how to fix this?
Thank you,
Chris
--
PHP Database Mailing List (http://www.php.net
>
> When I dump the query and run it in console I get the results I want. Not
> sure what I am doing wrong.
Your php code had more than one query running (one inside the other).
It's the outer query that runs twice, not the inner one returning
double the results
--
WWW: plphp.dk / plind.dk
Link
On Tue, Aug 9, 2011 at 2:55 PM, Frank Flynn wrote:
>
> You already have a foreign key, that is stores.store_by references
users.user_id. You might not have declared it (which is OK) but if that is
the key you want that is fine.
> I suspect you are seeing an inadvertent Cartesian product. The way
You already have a foreign key, that is stores.store_by references
users.user_id. You might not have declared it (which is OK) but if that is the
key you want that is fine.
I suspect you are seeing an inadvertent Cartesian product. The way you have
written this query you will get one row from