how to search from multiplets tables

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
khubaib.php
Forum Newbie
Posts: 6
Joined: Sun Mar 11, 2007 9:50 am

how to search from multiplets tables

Post 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.
thiscatis
Forum Contributor
Posts: 434
Joined: Thu Jul 20, 2006 11:00 am

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
khubaib.php
Forum Newbie
Posts: 6
Joined: Sun Mar 11, 2007 9:50 am

any example

Post by khubaib.php »

pleas can any one provide me a full example with code???

thanks in advance
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Re: any example

Post by JayBird »

khubaib.php wrote:pleas can any one provide me a full example with code???

thanks in advance
I doubt it!
mentor
Forum Contributor
Posts: 100
Joined: Sun Mar 11, 2007 11:10 am
Location: Pakistan

Post by mentor »

If you must want to search with single query, you can try UNION
Post Reply