php mysql

Thread Solved

Join Date: Oct 2009
Posts: 5
Reputation: jyotidagia is an unknown quantity at this point 
Solved Threads: 0
jyotidagia jyotidagia is offline Offline
Newbie Poster

php mysql

 
0
  #1
25 Days Ago
could someone point out the error in the followin php/mysql code

  1. $strSearchVal = $_GET['q'];
  2. //database connection..
  3. //...
  4.  
  5. $strSQL = "SELECT DISTINCT area FROM hospital where area like '%'+ $strSearchVal; ";
  6. $result = mysql_query($strSQL);
  7.  
  8. while ($arrThisRow = mysql_fetch_array($result )) {
  9. echo '<li>' . $arrThisRow['area'] . '</li>';
Last edited by peter_budo; 25 Days Ago at 7:34 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 798
Reputation: pritaeas is on a distinguished road 
Solved Threads: 130
Sponsor
pritaeas's Avatar
pritaeas pritaeas is offline Offline
Master Poster
 
1
  #2
25 Days Ago
  1. $strSQL = "SELECT DISTINCT area FROM hospital where area like '%$strSearchVal' ";
"If it is NOT source, it is NOT software."
-- NASA
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the MySQL Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC