I created a site (two actually) in September of 2002 using a dmoz import. I would like to do a new dmoz import, but would like to delete first ONLY the links that were imported and never modified since import. I have an active user base now that maintains their own links, but also have hundreds of dead links. Is there a way to do a mysql search on add date=something and mod date=same something and then delete them? I can't delete all links that have never been modified, only ones added on specific dates.
Jun 8, 2005, 11:45 PM
Veteran / Moderator (18441 posts)
Jun 8, 2005, 11:45 PM
Post #2 of 3
Views: 1836
Hi,
Should be simple.
SELECT MIN(ID) FROM lsql_Links;
...then, once you have that ID...
SELECT Add_Date FROM lsql_Links WHERE ID = 1234
SELECT ID,Add_Date FROM lsql_Links WHERE Add_Date = "2002-05-02" AND Mod_Date = "2002-05-02"
..and once your happy with those results, try;
DELETE FROM lsql_Links WHERE Add_Date = "2002-05-02" AND Mod_Date = "2002-05-02"
Hope that helps
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Should be simple.
SELECT MIN(ID) FROM lsql_Links;
...then, once you have that ID...
SELECT Add_Date FROM lsql_Links WHERE ID = 1234
SELECT ID,Add_Date FROM lsql_Links WHERE Add_Date = "2002-05-02" AND Mod_Date = "2002-05-02"
..and once your happy with those results, try;
DELETE FROM lsql_Links WHERE Add_Date = "2002-05-02" AND Mod_Date = "2002-05-02"
Hope that helps
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!