Anyone Good With Php/mysql?
#1
Im trying to use a function to save me writing the same lines of code over and over again. I'll just post up the code thats given me hassles though.
I get this error--
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/w3izard/public_html/products.php on line 18
function GetResults($category){
$result = mysql_query("SELECT * FROM tblProduct WHERE category = '".$category."' ",$db);
}
$cat="printer";
GetResults($cat);
$result = mysql_query("SELECT * FROM tblProduct WHERE category = '".$category."' ",$db);
}
$cat="printer";
GetResults($cat);
I get this error--
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/w3izard/public_html/products.php on line 18
Thread
Thread Starter
Forum
Replies
Last Post
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)