Oh, and P.S.: I got it to work on MySQL 3.2! SQL statements like this:
wfQuery("DELETE linkscc FROM linkscc,brokenlinks WHERE lcc_title=bl_from AND bl_to='{$ptitle}'", DB_WRITE);
are new in MySQL 4. I solved it by replacing it with something like this:
$ptitle = wfStrencode( $to->getPrefixedDBkey() ); $sql = "SELECT bl_from FROM brokenlinks WHERE bl_to='{$ptitle}'"; $res = wfQuery ($sql, DB_READ, $fname); if (wfNumRows ($res) != 0) { $inlst = ""; while ($obj1 = wfFetchObject ($res)) { if ($inlst != "") { $inlst = $inlst + ","; } $inlst = $inlst + $obj1->bl_from; } wfQuery("DELETE FROM linkscc WHERE lcc_pageid IN ({$inlst})", DB_WRITE); }
If anyone can see any obvious bug in this, let me know, but it seems that it's working quite fine! :-)
There was also one query where it was using "links" instead of "brokenlinks". It had two individual DELETE queries that I have merged into one. I believe that gives better performance, no? :-)
Timwi