Jump to content

simple php cronjob question


mybowlby

Recommended Posts

i have very little experience with php and im trying to setup my cronjobs for the script i purchased. Can someone tell me where i would put the time it would reset?

 

i know my database settings going in the x's but where do i put the time to reset? the installation directions are not very clear. Thanks everyone!

 

<?php

$host="localhost";

$username="XXXXXX";

$password="XXXXXX";

$db_name="XXXXXX";

 

$connect = mysql_connect("$host", "$username", "$password")or die("cannot connect");

mysql_select_db("$db_name")or die("cannot select DB");

 

$sql = "DELETE FROM `xtrm_train`";

mysql_query($sql,$connect);

 

 

?>

 

 

 

i also have the same question about this page with this code

 

<?php

$host="localhost";

$username="XXXXXX";

$password="XXXXXX";

$db_name="XXXXXX";

 

$connect = mysql_connect("$host", "$username", "$password")or die("cannot connect");

mysql_select_db("$db_name")or die("cannot select DB");

 

$sql = "UPDATE xtrm_vip SET vip_days=vip_days-1 WHERE vip_days > 0";

mysql_query($sql,$connect);

 

?>

Link to comment
https://forums.phpfreaks.com/topic/110163-simple-php-cronjob-question/
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.