• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Latestnews.php error gesior acc

Doss Aaa

New Member
Joined
Oct 14, 2013
Messages
48
Reaction score
4
Location
Poland
Hello i have error in my latestnews and i dont know how to fix that can someone help me ?

There is the code:
Code:
http://pastebin.com/wWKY7pRD
and here is the error:
Warning: Invalid argument supplied for foreach() in D:\Xampp\htdocs\pages\latestnews.php on line 269
 
I can be wrong i was checking a little bit fast but you are maybe missing a } in the end of that foreach code. But i'm not sure becuase i'm very tired and just check fast.
 
Change line 268 from:
Code:
$announcements=$SQL->query("SELECT * FROM `a` WHERE id ORDER BY `date` DESC LIMIT 1");
to:
Code:
$announcements=$SQL->query("SELECT * FROM `a` WHERE id ORDER BY `date` DESC LIMIT 1")->fetchAll();

PS. The table name seems to be just "a", which seems odd to me, but maybe that's what it's called, I don't know.
 
seems like fixed that error now i have this...
a3672e72eaace985bb6e0e6d7652b697.png
 
Do you have TeamViewer? It would be a lot easier, and quicker. If so, please send me your credentials through a PM and I'll hop on and have a look.
 
Back
Top