homepage Welcome to WebmasterWorld Guest from 50.19.206.49
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

    
search from database using two or more different keywords
using php search database by two or more keywords...
anya




msg:4619766
 11:05 am on Oct 29, 2013 (gmt 0)

Based on caste,religion,location,gender,age i need to filter data from my database,how shall i do it.

In mysql database i have religion,gender,,location,age as separate column in same table.

Code i have used

$result=mysql_query("SELECT * FROM enquiry where location like '%$text%' ") or die("error");
$found=mysql_num_rows($result);

if($found>0){
while($row=mysql_fetch_array($result)){
//display of data
}

Using this i can search data from one column using one keyword...as i am new please give me right way to slove this using php .

 

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved