[REP ++] MYSQL HELP
#1

Hello guys , i am working on an automatic system for CNN and i am little stuck.
I store all the advertisments in a table called 'Ads' . What do i want to do with the Advertisments ? I want that every ad to be showed in-game one by one with some time between them.But this is not a problem for me , i know how to do that , my real question is how to get them row by row , i mean if in database are 10 Advertisments first to be showed that one from the first row , than the second from the second row .... etc.

When i do the selection query "SELECT * FROM `Ads` WHERE `Adhasbeenshowed` = '0' " are displayed only the Advertisments that was not showed but there are more than 1. How can i show them one by one from the selection query?
Reply
#2

Use timestamp and ORDER BY.
Reply
#3

Quote:
Originally Posted by Richie©
Посмотреть сообщение
Use timestamp and ORDER BY.
I did this already, the selection code from my first comment is just an example, my problem is getting one by one the advertisments because when i use SELECT it shows me all the ads and i don't know how to show the first ad , then the second ..etc from the SELECT.
Reply
#4

LIMIT offset,howmany, like LIMIT 5,1 would get your 6th row.
Reply
#5

Quote:
Originally Posted by Sergei
Посмотреть сообщение
LIMIT offset,howmany, like LIMIT 5,1 would get your 6th row.
Worked !

PlayerInfo[playerid][Sergei] += 1 REP;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)