User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 374,159 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,442 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting

Search from multiple tables ??

Join Date: May 2008
Location: Hyderabad,India
Posts: 89
Reputation: Suhacini is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
Suhacini Suhacini is offline Offline
Junior Poster in Training

Re: Search from multiple tables ??

  #5  
May 9th, 2008
Thanks for ur reply.but i want to search a keyword from all the tables at once from a db.
As u said i have tried like tht but am getting the result onli from the last query.
For example:
 $var = @$_POST['keyword'] ;
  $trimmed = trim($var);

$query = "select * from a where MedName like \"%$trimmed%\"  
  order by dispname"; 

$query = "select * from b where MedName like \"%$trimmed%\"  
  order by dispname";
  
 $numresults=mysql_query($query);
 $numrows=mysql_num_rows($numresults);

Now if i want to search '1' and i wanted the result shuld be 'a1,b1' but am getting onli 'b1'

so waht shuold i do to get both a1,b1??
Reply With Quote  
All times are GMT -4. The time now is 3:41 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC