php - task scheduler after 5 min -


<?php     mysql_connect("localhost", "root", "");     $db=mysql_select_db("test");     $i=1;     $r=" insert test1 (score) values ('$i') "  ;     $t=mysql_query($r);     if($t)     {     $d="select score test1";     $x=mysql_query($d); $count=mysql_num_rows($x); if($count>0) {  while($row=mysql_fetch_array($x)) {     $i=$row['score']+5;      echo $i;     echo "<br>";     }}} 

in inserting $i value database ie 1 , after using select capture last value , add 5 in not working , cant use session because working on task scheduler , means after 5 mins script run , update database in database showing 1

<?php mysql_connect("localhost", "root", ""); $db=mysql_select_db("test"); $i=1;   $d="select score test1 order id desc limit 1 "; $x=mysql_query($d); $count=mysql_num_rows($x); if($count>0) {     $row=mysql_fetch_array($x))    $i=$row['score']+5; }  $r=" insert test1 (score) values ('$i') "  ; $t=mysql_query($r); ?> 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -