Searching all columns in a table

Reply

Join Date: Dec 2006
Posts: 34
Reputation: php_coder is an unknown quantity at this point 
Solved Threads: 0
php_coder php_coder is offline Offline
Light Poster

Searching all columns in a table

 
0
  #1
Jun 29th, 2007
Hi
I am trying to search the entire table (all the columns) for a search term. But am getting mysql error

$data = "SELECT * FROM songmaster WHERE songTitle like '".$find."' and mp3File like '".$find."'";

//And we display the results
while($result = mysql_fetch_array($data))
{
echo "<font face='Verdana' size='4' color=red>".$result['songTitle'];
echo "<br>";
echo "<font face='Verdana' size='4' color=red>".$result['mp3File'];
}

any help please?
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 494
Reputation: Puckdropper is an unknown quantity at this point 
Solved Threads: 21
Puckdropper Puckdropper is offline Offline
Posting Pro in Training

Re: Searching all columns in a table

 
0
  #2
Jun 29th, 2007
What is your error message?

My psychic debugging skills are weak, but I'm getting a feeling you need to run mysql_query() before mysql_fetch_array().
www.uncreativelabs.net

Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



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

©2003 - 2009 DaniWeb® LLC