Hi all,
I'm trying to create a search page, but when the search is processed i keep getting the following error:
Warning: Supplied argument is not a valid MySQL result resource
heres the code
<?php
$db = mysql_connect("localhost", "root"
$query = "SELECT * FROM Barrister.Barristers WHERE Barrister.Admissions LIKE '%$bar_search%' OR Barrister.Baristers LIKE '%$bar_search%'";
echo "Search results:<br><br>";
$result = mysql_db_query("fjc", $query);
while($r = mysql_fetch_array($result));
{
$bar_search = $r["bar_search"];
echo "$bar_search";
}
?>
Being new to php i think it is something simple that i cant yet see.
Thanks again...
Dunskii
I'm trying to create a search page, but when the search is processed i keep getting the following error:
Warning: Supplied argument is not a valid MySQL result resource
heres the code
<?php
$db = mysql_connect("localhost", "root"
$query = "SELECT * FROM Barrister.Barristers WHERE Barrister.Admissions LIKE '%$bar_search%' OR Barrister.Baristers LIKE '%$bar_search%'";
echo "Search results:<br><br>";
$result = mysql_db_query("fjc", $query);
while($r = mysql_fetch_array($result));
{
$bar_search = $r["bar_search"];
echo "$bar_search";
}
?>
Being new to php i think it is something simple that i cant yet see.
Thanks again...
Dunskii