Hi all, I am karthik. I am using using php with mysql. i am stuck with a qury. Pls hep me out. i have two tables. Here is table with sample data Table Name : Links linkid header 1 yahoo.com 2 google.com 3 php.net 4 sai.org 5 mysql.net Table Name : subLinks linkid childid 1 2 3 5 4 3 I want to fetch the linkid and header from links table based on condition that i select only the main links. which are not under any link In our example it is 1 and 4 Pls help out with the query..Its Urgent Thanks Jai Sairam Karthikeyan.S --------------------------------- Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site