On 21 Jan 2011, at 10:20, Alvaro Carrasco wrote: > Something like this should do it: > > delete table1 from table1 > inner join table2 on table1.table2_id = table2.id > where table2.created_date > '2011-01-01'
The date is unknown though and different for each foreign key. I just need to keep the most recent. It seems like it would need an ORDER BY and a LIMIT. I"m putting together a test but haven't gotten that far yet. _______________________________________________ UPHPU mailing list [email protected] http://uphpu.org/mailman/listinfo/uphpu IRC: #uphpu on irc.freenode.net
