Jump to content

Archived

This topic is now archived and is closed to further replies.

Gruzin

quick question

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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";

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.