i want to empty a table when the time comes
if time is 12:00am
empty this_Sql
i want to empty a table when the time comes
if time is 12:00am
empty this_Sql
Earn Extra Cash ONLINE !!Register here for FREE:
Make Money Online
wouldnt that be safer to do it manualy?Originally Posted by kei_ki7
![]()
XHTML, PHP, MySQL, CSS & more
why? is there negative there?
i dont know if there is.
i just want to empty a table![]()
Earn Extra Cash ONLINE !!Register here for FREE:
Make Money Online
$timezone = "0";
$calculate = ($timezone * 60 * 60);
$timenow = date("h", time() + $calculate);
if ($timenow == "12) {
mysql_query("DELETE FROM tablename_here ");
}
this should help you, bro.
thanks bro, but this code cant do automatically, its like a manual deleting a sql by loading the page where the code,Originally Posted by Mysterio3
Earn Extra Cash ONLINE !!Register here for FREE:
Make Money Online
cron job the file
im sory mate, i cant get what you've saidOriginally Posted by blackhowk
Earn Extra Cash ONLINE !!Register here for FREE:
Make Money Online
PHP Code:
$timezone = "8";
$calculate = ($timezone * 60 * 60);
$timenow = date("H", time() + $calculate);
if ($timenow >= "0" && $timenow <= "12" )
{
$acl9 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM bentot_autoclear WHERE l9logs"));
if ($acl9[0] == "1"){
$res = mysql_query("UPDATE ibwf_users SET pid='1' WHERE id='".getuid_sid($sid)."'");
mysql_query("DELETE FROM bentot_autoclear WHERE l9logs");
mysql_query("DELETE FROM ibwf_l9l ");
}
}
if ($timenow >= "13" && $timenow <= "23" )
{
$acl9 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM bentot_autoclear WHERE l9logs"));
if ($acl9[0] == "0"){
mysql_query("INSERT INTO bentot_autoclear SET l9logs='1' ");
}
}
i make this and its work, but its only a remedy because i dont know how to code in nice way
Earn Extra Cash ONLINE !!Register here for FREE:
Make Money Online
i recode like this, what do you think?PHP Code:$timezone = "8";
$calculate = ($timezone * 60 * 60);
$timenow = date("H", time() + $calculate);
if ($timenow >= "0" && $timenow <= "14" )
{
$acl9 = mysql_fetch_array(mysql_query("SELECT l9logs FROM bentot_autoclear"));
if ($acl9[0] == "1"){
mysql_query("UPDATE bentot_autoclear SET l9logs='0'");
mysql_query("DELETE FROM ibwf_l9l ");
}
}else{
$acl9 = mysql_fetch_array(mysql_query("SELECT l9logs FROM bentot_autoclear"));
if ($acl9[0] == "0"){
mysql_query("UPDATE bentot_autoclear SET l9logs='1'");
}
}
Earn Extra Cash ONLINE !!Register here for FREE:
Make Money Online
but that does not delete in hour 00., but from time 0 to 14, it delete every time you execute it. and still is not automatic.Originally Posted by kei_ki7
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks