
Untitled
By: a guest on
May 12th, 2012 | syntax:
None | size: 0.50 KB | hits: 15 | expires: Never
Deleting multiple rows from multiple tables MYSQL
$cleanacc_1 = "DELETE FROM $acc_1
WHERE `Scheduled` < DATE_SUB(UTC_TIMESTAMP(), INTERVAL 30 SECOND)";
$result = mysql_query($cleanacc_1);
DELETE FROM t1, t2,t3 USING t1 INNER JOIN t2 INNER JOIN t3 WHERE t1.id<10 and t2.id<10 and t3.id<10.
create table account (id int unsigned primary key auto_increment, other fields...);
delete from account where condition=true;
create table transaction (id, account_id, other transaction fields);