Log in

View Full Version : Auto execute query


SCuN
03-31-2008, 06:39 PM
Do I greet someone could write script which he made these query to cron of every hour ?

UPDATE search SET ipaddress = 0
UPDATE user SET ipaddress = 0
UPDATE post SET ipaddress = 0

thanks :rolleyes:

Dismounted
04-01-2008, 04:49 AM
Cron as in vBulletin Scheduled Task? Or proper crontab cron?

Marco van Herwaarden
04-01-2008, 10:04 AM
What you are probably looking for is:

AdminCP -> vBulletin Options -> Message Posting and Editing Options ->
Log IP Addresses: Do not log IP

SCuN
04-01-2008, 04:38 PM
Cron as in vBulletin Scheduled Task? Or proper crontab cron?
vBulletin Scheduled Task...

AdminCP -> vBulletin Options -> Message Posting and Editing Options ->
Log IP Addresses: Do not log IP
so marked have so but when someone registers his ip he is written down farther ... why I do not know...

Dismounted
04-02-2008, 05:12 AM
This is basically the whole script:
$vbulletin->db->query_write("UPDATE search SET ipaddress = 0");
$vbulletin->db->query_write("UPDATE user SET ipaddress = 0");
$vbulletin->db->query_write("UPDATE post SET ipaddress = 0");

SCuN
04-03-2008, 06:06 AM
He Thanks very much

That is I have to create the file php with content

$vbulletin->db->query_write("UPDATE search SET ipaddress = 0");
$vbulletin->db->query_write("UPDATE user SET ipaddress = 0");
$vbulletin->db->query_write("UPDATE post SET ipaddress = 0");

and to send him to /forum/includes/cron/ and I use from Scheduled Task
Apologize then that I give so stupid questions but I have vbulletin from 3 weeks

Dismounted
04-03-2008, 06:18 AM
No, I believe you will need to add some standard cron PHP around it. Look in the files vBulletin comes with, and you will know what to add.

SCuN
04-03-2008, 06:34 AM
ok thanks
I already know
<?php
error_reporting(E_ALL & ~E_NOTICE);
if (!is_object($vbulletin->db))
{
exit;
}

$vbulletin->db->query_write("UPDATE search SET ipaddress = 0");
$vbulletin->db->query_write("UPDATE user SET ipaddress = 0");
$vbulletin->db->query_write("UPDATE post SET ipaddress = 0");

?>