MySQL Forums
Forum List  »  PHP

query problem in php
Posted by: tom s
Date: October 21, 2005 02:00AM

Hi, i'm trying to select data from different tables, i've done it before without problems but for some reason this doesn't work. I've already lost several hours on this one.

$result = mysql_query("select * FROM ordercheck, orderdetails, items WHERE ordercheck.ordernr='$ordernr' AND orderdetails.label2=items.label AND orderdetails.cookieId=ordercheck.cartId");


problem seems to be in the:
orderdetails.label2=items.label
part

Both those fields exist but i keep getting this error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource

if i change the fields or leave them out there's no error. Both fields are "text" type.

it's driving me insane, all help much appreciated

thanks

Options: ReplyQuote


Subject
Written By
Posted
query problem in php
October 21, 2005 02:00AM
December 21, 2005 03:25AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.