| | |
Searching all columns in a table
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Dec 2006
Posts: 34
Reputation:
Solved Threads: 0
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?
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?
•
•
Join Date: Jul 2004
Posts: 494
Reputation:
Solved Threads: 21
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().
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.
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.
![]() |
Similar Threads
- Data from mysql in a 3 columns table (PHP)
- Create Table on SqlServer Through Asp.net coding (ASP.NET)
- Table Layout Pannels (C#)
- How to make the columns in a table resizable (JavaScript / DHTML / AJAX)
- Script stores data in wrong MySQL columns (MySQL)
Other Threads in the PHP Forum
- Previous Thread: Is there a conflict between Php 4.3.2 and Php4.2.3?
- Next Thread: new php programmer
| Thread Tools | Search this Thread |
address apache api array auto autoincrement beginner binary broken cache cakephp checkbox class cms code cron curl customizableitems database date dehasher display dynamic echo email error errorlog external file files folder form format forms forum function functions gc_maxlifetime google headmethod host href htaccess html image include incode insert ip javascript joomla limit link login mail malfunctioning masterthesis menu method mlm multiple mysql oop parsing paypal pdf php phpmysql popup problem query question radio random recursion remote script search select server sessions sms source space sql support! survey syntax system table trouble tutorial update upload url validator variable video web youtube





