1
onasre
cron job to embty tabel
  • 2008/4/26 20:35

  • onasre

  • Not too shy to talk

  • Posts: 150

  • Since: 2006/8/12


can some one provide me with php code to make cron job file to empty sessanon table from the database every day? the Xoopscare module did not embty the tabel even i have spicifed one day to embty it
Whatever Hits You , Never was to Mess you , and Whatever Messed U , Never Was to Hit You.

2
Anonymous
Re: cron job to embty tabel
  • 2008/4/27 3:27

  • Anonymous

  • Posts: 0

  • Since:


<?php
MYSQL_CONNECT
('localhost','database_username','database_password');
@
mysql_select_db("database_name") or die(mysql_error());

$query="TRUNCATE xoops_session";

mysql_query($query);
mysql_close()
?>

3
onasre
Re: cron job to embty tabel
  • 2008/4/27 4:49

  • onasre

  • Not too shy to talk

  • Posts: 150

  • Since: 2006/8/12


Thx brother
so when i want to embty another tabel i just add another tabel name below

$query="TRUNCATE xoops_session";

like

$query="TRUNCATE xoops_avatr";


thx
Whatever Hits You , Never was to Mess you , and Whatever Messed U , Never Was to Hit You.

4
Anonymous
Re: cron job to embty tabel
  • 2008/4/27 12:57

  • Anonymous

  • Posts: 0

  • Since:


yes

Login

Who's Online

180 user(s) are online (105 user(s) are browsing Support Forums)


Members: 0


Guests: 180


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits