Update: I'm not getting error messages using either of the following MySQL statements:
Version 1 (works):
PHP Code:
$query = "DELETE FROM " . TABLE_PREFIX . "pmtext, " . TABLE_PREFIX . "pm, " . TABLE_PREFIX . "pmreceipt USING " . TABLE_PREFIX . "pmtext, " . TABLE_PREFIX . "pm, " . TABLE_PREFIX . "pmreceipt WHERE (" . TABLE_PREFIX . "pm.pmid = " . TABLE_PREFIX . "pmreceipt.pmid) AND (" . TABLE_PREFIX . "pm.pmtextid = " . TABLE_PREFIX . "pmtext.pmtextid) AND " . TABLE_PREFIX . "pmtext.dateline < $time";
Version 2 (works):
PHP Code:
$query = "DELETE " . TABLE_PREFIX . "pmtext . * , " . TABLE_PREFIX . "pm . * , " . TABLE_PREFIX . "pmreceipt . * FROM " . TABLE_PREFIX . "pmtext, " . TABLE_PREFIX . "pm, " . TABLE_PREFIX . "pmreceipt WHERE " . TABLE_PREFIX . "pm.pmid = " . TABLE_PREFIX . "pmreceipt.pmid AND " . TABLE_PREFIX . "pm.pmtextid = " . TABLE_PREFIX . "pmtext.pmtextid AND " . TABLE_PREFIX . "pmtext.dateline < $time";
Is there any advantage of one over the other?
I will release this as an add-on when it's fully tested in case anyone else might find it useful.
I'm using PHP v4.4.4 with MySQL v4.1.21.