• 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!

[GESIOR] Invalid argument (Foreach())

Sentinel3

New Member
Joined
Oct 16, 2014
Messages
180
Reaction score
0
Hello everyone,

I think that a lot of people had this error sometimes, so how can I solve this? I don't know. Maybe I miss some queries in database?

Error that I got:
Warning: Invalid argument supplied for foreach() in /pages/latestnews.php on line 38

latestnews.php

I hope that you can help us with this problem, it's very anoying to see this when you try to add something in your website.
 
Alright, done. But now how can I know what type of queries I have to add in my database (like: item,itemid,player,etc)?
HTML:
Query:     SELECT * FROM `z_news_tickers` WHERE hide_ticker != 1 ORDER BY date DESC LIMIT 4;
SQLSTATE:     42S02
Driver code:     1146
Error message:     Table 'forgottenserver.z_news_tickers' doesn't exist
Query:     SELECT `z_forum`.`post_topic`, `z_forum`.`author_guid`, `z_forum`.`post_date`, `z_forum`.`post_text`, `z_forum`.`id`, `z_forum`.`replies`, `players`.`name` FROM `z_forum`, `players` WHERE `section` = '1' AND `z_forum`.`id` = `first_post` AND `players`.`id` = `z_forum`.`author_guid` ORDER BY `post_date` DESC LIMIT 6;
SQLSTATE:     00000
Driver code:   
Error message:
 
I added the queries and still not working, i got the same error as comment above. But now I have the table, thank you!

Bump
 
Last edited by a moderator:
Getting the same error.

Error that I got in Website:
Warning: Invalid argument supplied for foreach() in /pages/latestnews.php on line 38
HTML:
Query:     SELECT * FROM `z_news_tickers` WHERE hide_ticker != 1 ORDER BY date DESC LIMIT 4;
SQLSTATE:     42S02
Driver code:     1146
Error message:     Table 'forgottenserver.z_news_tickers' doesn't exist
Query:     SELECT `z_forum`.`post_topic`, `z_forum`.`author_guid`, `z_forum`.`post_date`, `z_forum`.`post_text`, `z_forum`.`id`, `z_forum`.`replies`, `players`.`name` FROM `z_forum`, `players` WHERE `section` = '1' AND `z_forum`.`id` = `first_post` AND `players`.`id` = `z_forum`.`author_guid` ORDER BY `post_date` DESC LIMIT 6;
SQLSTATE:     00000
Driver code:
Error message:
 
Don't be rude.
The error clearly states:
Code:
Error message: Table 'forgottenserver.z_news_tickers' doesn't exist
So your probably just stupid enough to realize that your data table doesn't exist.
MySQL doesn't print this error just for fun.
 
@Vanderlay I think that I can be enough intelligent to know that I have the table in my database.

z_news_tickers, it's below z_forum and on z_ots_comunication.
Captura_zpsda0448c1.png


structure of table.
Captura1_zps51876494.png
 
You're probably looking at the wrong database.
MySQL would never print that error otherwise, unless its a custom error message made from Geisor which could be incorrect.
 
I don't know what's this.. I'm very very confused

Code:
Warning: Invalid argument supplied for foreach() in /pages/latestnews.php on line 38
Query:     SELECT * FROM `z_news_tickers` WHERE hide_ticker != 1 ORDER BY date DESC LIMIT 4;
SQLSTATE:     00000
Driver code:   
Error message:   
Query:     SELECT `z_forum`.`post_topic`, `z_forum`.`author_guid`, `z_forum`.`post_date`, `z_forum`.`post_text`, `z_forum`.`id`, `z_forum`.`replies`, `players`.`name` FROM `z_forum`, `players` WHERE `section` = '1' AND `z_forum`.`id` = `first_post` AND `players`.`id` = `z_forum`.`author_guid` ORDER BY `post_date` DESC LIMIT 6;
SQLSTATE:     00000
Driver code:   
Error message:
 
Alright now I can see the most powerfull guilds without logos :eek:!

How can I make to show the New Tickers? Because news tickers are added in latestnews.php
 
Have you added any News Tickers into the table?

p.s.
It's always nice to say Thanks or give a Like if someone helped you.
 
Ye I've the table as you can see in previous comments that I posted a pictures.


Yes I'm so sorry @imkingran, thank you so much for your time and your job.;)

I mean have you inserted data into the tables? In the picture I only see the basic structure of the table :p

Like this:
8d8342Y.png
 
Back
Top