I\'m not exactly sure if this is a problem with my php script, or the way I set up the mysql database.
Simply, when I search the database with \'one\' keyword it prints every table inside the database.
Every thing connects fine, and the submission form works fine, it\'s only when I search it.
I have a totaly of 4 tables only, however all the keywords are very different, yet it still prints every table.
I\'ve tried chaing the table types to CHAR, and VARCHAR, and TEXT, and I\'ve tried turning \'Null\' off and on.
Below, is an example of how I have my db / tables set up.
| Field | Type |Attributes | Null | Default | Extra |
| title | text | | Yes | | |
| url | text | | Yes | | |
| words | varchar(150) | | No | | |
| des | text Yes | | | | |
| title | url | words | des |
| My Site | testing.com | mysql php help free | descrition here |
And below the query script I\'m using in php.
if ($title == \"\")
{$title = \'%\';}
if ($url == \"\")
{$url = \'%\';}
if ($words == \"\")
{$words = \'%\';}
if ($des == \"\")
{$des = \'%\';}
$table = \"search\";
$query = (\"SELECT * FROM $table WHERE words LIKE \'$words%\'\");
if ($result = MYSQL_QUERY($query)) {
do {
print (\"ETC..\");
} while($row = mysql_fetch_array($result));
} else {print \"Sorry, no records were found!\";}
?>
I\'d be greatfull for any help, or if some one could point me in the right direction.