[PHP] Re: what problem in this sql

2003-03-12 Thread Joel Colombo
oh and i just noticed u want to select the 'type_id' twice... i assume from each table SO u need to... SELECT table1.type_id AS t1_type_id, table2.type_id AS t2_type_id FROM t1, t2 use the 'AS' function it helps with a lot of headache later... trying to figure out y u get the wrong index ! Joel

[PHP] Re: what problem in this sql

2003-03-12 Thread Joel Colombo
when using multiple tables u must specify where the fields u want are coming from too. also the first piece of your WHERE has contdata NOT cont_data. i just slapped the cont_data.* to all your field names u may want those fields from different tables SELECT cont_data.type_id, cont_data.type_name,