944,155 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 1704
  • PHP RSS
Jun 29th, 2007
0

Searching all columns in a table

Expand Post »
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?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
php_coder is offline Offline
34 posts
since Dec 2006
Jun 29th, 2007
0

Re: Searching all columns in a table

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().
Reputation Points: 23
Solved Threads: 23
Posting Pro in Training
Puckdropper is offline Offline
494 posts
since Jul 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Is there a conflict between Php 4.3.2 and Php4.2.3?
Next Thread in PHP Forum Timeline: new php programmer





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC