Gruzin Posted August 27, 2006 Share Posted August 27, 2006 hi guys, I know that it sounds like funny, but I cann't select multiple tables from db. I've tryed some tutorials but... I have errors, if it won't take your time, please look at it and tell me what's the problem. here are some examples: [code]$query = "SELECT * FROM test OR test2 WHERE mes LIKE '%$trimmed%' ORDER BY mes";$query = "SELECT * FROM test AND test2 WHERE mes LIKE '%$trimmed%' ORDER BY mes";$query = "SELECT * FROM test, test2 WHERE mes LIKE '%$trimmed%' ORDER BY mes";[/code]Thanks for you time Link to comment https://forums.phpfreaks.com/topic/18818-quick-question/ Share on other sites More sharing options...
Gruzin Posted August 27, 2006 Author Share Posted August 27, 2006 I really need your help... Link to comment https://forums.phpfreaks.com/topic/18818-quick-question/#findComment-81190 Share on other sites More sharing options...
hostfreak Posted August 27, 2006 Share Posted August 27, 2006 I am not sure you can select from multiple tables in one query? I may be wrong though. If I am correct though, I think you would have to make however many querys for each table. I may be totally wrong though. Link to comment https://forums.phpfreaks.com/topic/18818-quick-question/#findComment-81192 Share on other sites More sharing options...
Gruzin Posted August 27, 2006 Author Share Posted August 27, 2006 ok thanks, but how can I run many querys?like this:$query = "SELECT * FROM [color=red]test[/color] WHERE mes LIKE '%$trimmed%' ORDER BY mes";and how do I coonect this to another?$query = "SELECT * FROM [color=red]test2[/color] WHERE mes LIKE '%$trimmed%' ORDER BY mes"; Link to comment https://forums.phpfreaks.com/topic/18818-quick-question/#findComment-81197 Share on other sites More sharing options...
wildteen88 Posted August 27, 2006 Share Posted August 27, 2006 Thread closed. You already have a thread open about this in the [url=http://www.phpfreaks.com/forums/index.php/topic,105810.0.html]MySQL Help[/url] forum.Do not post multiple copies of the same problem in different forums. Link to comment https://forums.phpfreaks.com/topic/18818-quick-question/#findComment-81220 Share on other sites More sharing options...
Recommended Posts