Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/a3781901/public_html/master/GameEngine/Database/db_MYSQL.php on line 514
Duplicate entry '0' for key 'PRIMARY'
Code (PHP)
function getVillageType($wref) {
$q = "SELECT id, fieldtype FROM " . TB_PREFIX . "wdata where id = $wref";
$result = mysql_query($q, $this->connection);
$dbarray = mysql_fetch_array($result);
return $dbarray['fieldtype'];
}
function getVillageData($wref) {
$q = "SELECT * FROM " . TB_PREFIX . "wdata where id = $wref";
$result = mysql_query($q, $this->connection);
return $this->mysql_fetch_all($result);
}
function getVillageType2($wref) {
$q = "SELECT * FROM " . TB_PREFIX . "wdata where id = $wref";
$result = mysql_query($q, $this->connection);
$dbarray = mysql_fetch_array($result);
;
return $dbarray['oasistype'];
}
function getVilWref($x, $y) {
$q = "SELECT * FROM " . TB_PREFIX . "wdata where x = $x AND y = $y";
$result = mysql_query($q, $this->connection);
$dbarray = mysql_fetch_array($result);
return $dbarray['id'];
}
แก้แล้วขึ้น
Parse error: syntax error, unexpected T_PUBLIC in /home/a3781901/public_html/master/GameEngine/Database/db_MYSQL.php on line 2390
แบบนี้ครับ