MySQL version 5.5.37 using phpmyadmin
I have a problem with deleting the ID’s from 2 tables.
The tables are jos_users and jos_vm_user_info
I need to delete the id's from both tables using the ‘registered before‘ date and ‘last visit’ date in jos_users
If I run this -
DELETE jos_users,jos_vm_user_info from jos_users,jos_vm_user_info WHERE jos_users. `registerDate` < '2012-12-31 23:59:59' AND `lastvisitDate` < '2012-12-31 23:59:59'
I get ‘0 rows deleted’. I would expect over 2000 rows to be deleted
I’ve obviously got something wrong there but I don’t enough about what I’m doing
or is there a better way to do it?
BTW a SELECT using the table and conditional statements works fine
SELECT * FROM `jos_users` WHERE `registerDate` < '2012-12-31 23:59:59' AND `lastvisitDate` < '2012-12-31 23:59:59'
It’s getting the id's deleted in the the jos_vm_user_info table that’s the problem.