Hi everyone,
I have been trawling through the documentation and at various sites and i am confused as to what i need to do in order to resolve lookup fields.
I have a main table with items in it and some fields are simply an ID such as the city_id, which references the city in the city table.
I have about 5 or 6 or these.
My query is as follows...
I have left it open ended as i want to add the specific info there for the query and am simply trying to get all the basic stuff first.
example of extra sql on the end..
When i try and run this query it mysql query browser just hangs, run from within my web page that hangs.
Can anyone help me out with this, as it should be a fairly common task, so i cant see why i am having such problems.
Also can anyone suggest what the INSERT statement format would be which resovles lookups.
Thanks in advance.
Jez
I have been trawling through the documentation and at various sites and i am confused as to what i need to do in order to resolve lookup fields.
I have a main table with items in it and some fields are simply an ID such as the city_id, which references the city in the city table.
I have about 5 or 6 or these.
My query is as follows...
Code:
SELECT *
FROM
items i,
city c,
item_price_category p,
chapter ch,
areas a,
index_cat2 c2
WHERE
i.item_price_cat_id = p.price_cat_id AND
i.item_price_cat_id = p.price_cat_id AND
i.item_city_id = c.city_id AND
i.item_chapter_id = ch.chapter_id AND
i.item_cat2_id = c2.cat2_id AND ....
I have left it open ended as i want to add the specific info there for the query and am simply trying to get all the basic stuff first.
example of extra sql on the end..
Code:
c.city_name LIKE '%london%' OR
a.area_desc LIKE '%london%'
ORDER BY i.item_name ASC LIMIT 0,5;
When i try and run this query it mysql query browser just hangs, run from within my web page that hangs.
Can anyone help me out with this, as it should be a fairly common task, so i cant see why i am having such problems.
Also can anyone suggest what the INSERT statement format would be which resovles lookups.
Thanks in advance.
Jez