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 Quote 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? Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/133181-solved-join-wont-work/#findComment-692826 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.