Page 1 of 1

how to search from multiplets tables

Posted: Mon Mar 19, 2007 7:01 am
by khubaib.php
hey .....

i have developed an CMS but the problem that i am facing is i want to search from the hole data base how i can do that ..just like the search in this forum

after writing a query ,it search from the database and give a list of records.. thats what i want to do.

thanks in advance.

Posted: Mon Mar 19, 2007 8:12 am
by thiscatis
You want find anything in a hole database ;).

//Misread your topic. This is for one table, multiple columns.
// If you want to search your entire database for matching fields you can use the WHERE column = $postdata AND column2 = $postdata2

You can also use OR,
or just write a function, loop so it checkes which criterias needs to be checked.

Posted: Mon Mar 19, 2007 10:01 am
by feyd
Typically searching multiple tables will require multiple queries to search each table individually. This forum only uses one table, maybe two tables, during searching.

any example

Posted: Tue Mar 20, 2007 5:38 am
by khubaib.php
pleas can any one provide me a full example with code???

thanks in advance

Re: any example

Posted: Tue Mar 20, 2007 5:47 am
by JayBird
khubaib.php wrote:pleas can any one provide me a full example with code???

thanks in advance
I doubt it!

Posted: Tue Mar 20, 2007 5:48 am
by mentor
If you must want to search with single query, you can try UNION