hello i have a sql server database and it's contain a table and inside this table i receives from a mobile operator in my country to run a short code service .. and i received sms from mobile user and it will be stored in this table for this reason every couple of second new sms will be stored in this table
and now i want to make a php application where i can extract this sms and get the content of the sms sended from mobile user and to filter it if he send letter A it will be subscribed to serices A and UA to unsubscribed from service A so i should make a php script to work all time to get new sms and put a flag read before not reading it again... but :S how i can do it ?
because when i run or execute php script to connect to sql server and fetch row in this table each 1 min for example have simultaneous rows access how i can solve it ??
i have read two much in lock commit rollback but i don't know the concept of it
so if we can help me to find the best solution to filter sms sended from mobile user where it's stored in specific table and make a flag read to not read it again when i run the cron job .. but the problem will be if the first executing is not finish and still work and the another one work :D
the problem script1.php fetch 100 rows at row 30 will read and update the flag to read
but in this time. the script1.php is already running and he try 2 execute the same row so error occurs
i try two run the php script for a couple of minute using windows scheduling task because i don\t know how to install cron job on IIS
i work in win server 2003 IIS PHP MYSQL SQL