An SMS game with Autoreply database
This game was requested by one of our customers.
>What I actually like to do is a game, where every 3000 incoming SMS wins. Every sender
>should receive an answer on which position he he is, like you are on position 2333, you didn't win.
This is very easy. You can use the "Autoreply Database User" in Ozeki NG to create this service.
You should create a database table that stores the incoming messages and put the following SQL commands into the "Autoreply Database Script". Please note that these queries are for MySQL.
n.* INSERT INTO inmsg (phonenum,msg) VALUES ('$sender','$messagedata'); SELECT '$sender',concat('Looser. You are number ',(select count(*) from users)) from inmsg where (select count(*) from users)<>3000 limit 1; SELECT '$sender','Winner. You are number 3000.' from inmsg where (select count(*) from users)=3000 limit 1;
The databse table layout can be:
CREATE TABLE inmsg ( id int not null auto_increment primary key, phonenum varchar(30), msg varchar(255));
More information