Closed TheMegafuji closed 10 years ago
Not sure if you fix on fetchAllNews will work if there actually is one player online? I put it all in an if-clause,
function fetchAllNews() {
$data = mysql_select_multi("SELECT * FROM znote_news
ORDER BY id
DESC;");
if ($data !== False) {
for ($i = 0; $i < count($data); $i++) {
$cd = user_character_data($data[$i]['pid'], 'name');
$data[$i]['name'] = $cd['name'];
unset($data[$i]['pid']);
}
return $data;
}
}
All these should be fixed now.
Register.php is giving Username is already registred a lot of times. to fix change user_exist function in engine/functions/users.php to this:
function user_exist($username) { $username = sanitize($username); $data = mysql_select_single("SELECT
id
FROMaccounts
WHEREname
='$username';"); return ($data !== false) ? true : false; }This error: string(43) "SELECT
name
FROMplayers
WHEREid
= ;" (query - SQL error) Type: select_single (select single row from database)Is fixed by: engine/functions/users.php function fetchAllNews(): Change for ($i = 0; $i < count($data); $i++) { to for ($i = 1; $i < count($data); $i++) {
Admin creating a new, when its not created, fixed by: change all mysql_query to mysql_update if its an update query mysql_insert if its an insert query mysql_delete if its an delete query