maxelct Posted November 18, 2008 Share Posted November 18, 2008 I have been asked to create some queries on what I am told is a big database (one table has 60 million odd enteries...) ANyway I want to get info from two tables, table1 and table2 (made the names easier) Here's what I have: $query ="SELECT * FROM table1, table2 WHERE table1.appln_id=table2.appln_id LIMIT 1,10"; $result = mysql_query($query); If ($result){ echo 'success!'; }else{ echo 'failure'; } and this appears to work since I get success! printed out What I want though is to set another condition so that if only Selects results where appln_id is say <100 how would I add that into the query please? thanks in advance Edward Link to comment https://forums.phpfreaks.com/topic/133181-solved-join-wont-work/ Share on other sites More sharing options...
fenway Posted November 18, 2008 Share Posted November 18, 2008 I assume you're already tried the obvious? Link to comment https://forums.phpfreaks.com/topic/133181-solved-join-wont-work/#findComment-692720 Share on other sites More sharing options...
maxelct Posted November 18, 2008 Author Share Posted November 18, 2008 which I assume is to add on the end of the where bit as an and and yes, apologies I have tired and even more apologies it worked...... Sorry Link to comment https://forums.phpfreaks.com/topic/133181-solved-join-wont-work/#findComment-692826 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.