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, cont_data.cont_id,
cont_data.type_id, cont_data.cont_title, cont_data.cat_id,
cont_data.cat_name
  FROM cont_data, cont_cats, cont_types
  WHERE contdata.cont_id = $cont_id
  AND cont_data.type_id = cont_types.type_id
  AND cont_data.cat_id = cont_cats.cat_id

just remember when pointing to more then 1 table in FROM. u must always
specify where u are selecting from as well.... unless u SELECT * FROM t1,
t2... that will work or SELECT t1.*, t2.field_a, t2.field_c... works also.

Joel Colombo




"Alawi" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>   SELECT type_id, type_name, cont_id, type_id, cont_title, cat_id,
cat_name
>   FROM cont_data, cont_cats, cont_types
>   WHERE contdata.cont_id = $cont_id
>   AND cont_data.type_id = cont_types.type_id
>   AND cont_data.cat_id = cont_cats.cat_id
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Web Hosting - establish your business online



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to