Hello guys. I have little problem with my MySQL. home/xxx/set.php
It is:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in home/xxx/set.php on line 10
Here is set.php:
<?php
$sitename = "http://xxx.xxx";
$link = mysql_connect("localhost", "xxx_admin", "xxxxxx");
$db_selected = mysql_select_db('xxx_database1', $link);
mysql_query("SET NAMES utf8");
function fetchinfo($rowname,$tablename,$finder,$findervalue) {
if($finder == "1") $result = mysql_query("SELECT $rowname FROM $tablename");
else $result = mysql_query("SELECT $rowname FROM $tablename WHERE `$finder`='$findervalue'");
$row = mysql_fetch_assoc($result);
return $row[$rowname];
}
?>
Whats wrong ? Can u help me guys ? Please. :')