Two different rows Chris. reference ministry_directory_entry ministry_directory_category_reference 13 1 10 14 1 11 What I am trying to do is allow the user to make a more specific search. Ron On Mon, 2008-03-10 at 10:37 +1100, Chris wrote: > > > ministry_directory_listing_categories.ministry_directory_category_reference = 10 AND > > > ministry_directory_listing_categories.ministry_directory_category_reference > = 11 > > Can a record really have a reference for two different id's like this? > ie can it be both '10' and '11' at the same time? > > What's actually in the table for ministry_directory_listing_categories > for this record? > > > For long table names, I'd also suggest using a table alias to make it > easier to read/write: > > select * from table1 as a inner join table2 as b using(id) > where a.field_name='1' and b.fieldname='5'; > > saves you having to write out 'ministry_directory_listing_categories' > and 'ministry_directory'. > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php