mysql 中多表联合删除
https://www.cnblogs.com/sunss/archive/2011/01/20/1940306.html
使用场景123456789//删除 项目与图片的中间表//别名只能在关联中给出//正确: delete t1,t2 from table_name as t1 left join table2_name as t2 on t1.id=t2.id where table_name.id=25//错误: delete table_name,table2_name from table_name as t1 left join table2_name as t2 on t1.id=t2.id where table_name.id=25$delete = "delete t1,t2 from ";$fromStr = $Base->table('imgs_works')." as t1 left join ".$Base->table('imgsmain')." as t2 ";$whereStr = "on t1.pk_img_main=t2.pk_img_main where t1.pk_works_main=".$pid;$execSqlStr = $delete.$fromStr.$whereStr;$delete = $Db ->execSql($execSqlStr);