Well…I tried 1.8.2 and I get inconsistent delete results. Sometimes it deletes all the ones I want, sometimes it deletes 1 of 3, or 2 of 4, but it always seems to leave two in the database.
The delete all seems to work, though.
Not sure if it’s the plugin or my SQL database at this point, but I am able to delete the items in phpMyAdmin by using the SQL DELELE statement without quotes for the submit_time.
Also, when I do the print_r in the code, I do see single quotes again, but I’m not sure where they are coming from.
delete from ~wp_CF7DBPlugin_SUBMITS~ where ~form_name~ = 'eNewsletter' and ~submit_time~ = '1301319511.9545'
I tried upgrading and completely removing the tables and doing a fresh install. I get the same results with any configuration/installment method.
I also reverted back to my modified 1.8.1 version and tested it and I get inconsistent results there, too. So maybe removing the single quotes around the %s wasn’t enough.
When I do a print_r for just the $wpdb variable, this is SOME of what I see…
...
wpdb Object (
[last_query] => delete from ~wp_CF7DBPlugin_SUBMITS~ where ~form_name~ = 'eNewsletter' and ~submit_time~ = '1301319511.9545'
...
[charset] => utf8 [collate] =>
...
[func_call] => $db->query("delete from ~wp_CF7DBPlugin_SUBMITS~ where ~form_name~ = 'eNewsletter' and ~submit_time~ = '1301319511.9545'")
)
...
Maybe the collate needs to be set? I’m using utf8_inicode_ci. Other than that, I’m stumped.