It didn't work. Here's my adjusted code and the results I got from it:
Code:
<?php
require ("global.php");
$time = time() - (27 * 24 * 60 * 60);
$a = $db->query("DELETE * FROM vbul_pmtext, vbul_pm, vbul_pmreceipt WHERE (vbul_pm.pmid = vbul_pmreceipt.pmid) AND (vbul_pm.pmtextid = vbul_pmtext.pmtextid)AND vbul_pmtext.dateline < $time");
?>
Code:
Database error in vBulletin 3.6.4:
Invalid SQL:
DELETE * FROM vbul_pmtext, vbul_pm, vbul_pmreceipt WHERE (vbul_pm.pmid = vbul_pmreceipt.pmid) AND (vbul_pm.pmtextid = vbul_pmtext.pmtextid)AND vbul_pmtext.dateline < 1170411524;
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM vbul_pmtext, vbul_pm, vbul_pmreceipt WHERE (vbul_pm.pmid = vbul_pmreceipt' at line 1 Error Number : 1064
Date : Tuesday, February 27th 2007 @ 04:18:44 AM
There probably needs to be some sort of left join in there to get it working.