Jump to content


Photo

quick question


  • This topic is locked This topic is locked
4 replies to this topic

#1 Gruzin

Gruzin
  • Members
  • PipPipPip
  • Advanced Member
  • 448 posts
  • LocationGeorgia

Posted 27 August 2006 - 05:20 PM

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:

$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";

Thanks for you time
I don't need your script, I'll try to write it myself

#2 Gruzin

Gruzin
  • Members
  • PipPipPip
  • Advanced Member
  • 448 posts
  • LocationGeorgia

Posted 27 August 2006 - 06:13 PM

I really need your help...
I don't need your script, I'll try to write it myself

#3 hostfreak

hostfreak
  • Members
  • PipPipPip
  • Advanced Member
  • 581 posts

Posted 27 August 2006 - 06:19 PM

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.

#4 Gruzin

Gruzin
  • Members
  • PipPipPip
  • Advanced Member
  • 448 posts
  • LocationGeorgia

Posted 27 August 2006 - 06:26 PM

ok thanks, but how can I run many querys?
like this:

$query = "SELECT * FROM test WHERE mes LIKE '%$trimmed%' ORDER BY mes";

and how do I coonect this to another?

$query = "SELECT * FROM test2 WHERE mes LIKE '%$trimmed%' ORDER BY mes";

I don't need your script, I'll try to write it myself

#5 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 27 August 2006 - 07:23 PM

Thread closed. You already have a thread open about this in the MySQL Help forum.

Do not post multiple copies of the same problem in different forums.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users