Jump to content

update


1zeus1

Recommended Posts

or need to run this code on the server every 4 to 5 s without opening the page in browser

 

<?php

 

 

$con = mysql_connect("*","*","*");

if (!$con)

  {

  die('Could not connect: ' . mysql_error());

  }

 

mysql_select_db("*", $con);

 

$result = mysql_query("SELECT *

FROM  `ta`

WHERE  `top` LIKE  '0'  LIMIT 0,1");

 

$row_ro = mysql_fetch_array($result);

 

 

 

$a = $row_ro['id'];

 

 

 

 

 

$query="UPDATE  tr SET

top =  '1'

WHERE  id = '$a'";

mysql_query($query);

mysql_close($con);

?>

 

 

regards

 

Link to comment
https://forums.phpfreaks.com/topic/261314-update/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.