DELETE FROM wp_options where option_name LIKE '%_wp_session_%' AND option_ID BETWEEN '5000' AND '10000';
It didnt do anything
Just in case I did a search query with same criteria and it generated the following code:
SELECT * FROM wp_options WHERE option_id BETWEEN 5000 AND 10000 AND option_name LIKE ‘%_wp_session_%’
But when I replaced select with delete it gave syntax error.
But if I try yours, it doesnt do anything. May be the % after wp session should be added to yours?
‘DELETE’, not ‘DELETE *’.
Ok so I used
DELETE from wp_options where option_name like “%_wp_session_%” and option_id between 5000 and 10000
and it works.
the first time i did deletion, i deleted only about 500 rows (my numbers were different than 5000 and 10000) and then i checked the total number of rows of table and it indeed went down by 500
but then i deleted about 2500 rows but the total number of rows of table ent down by only few hundred. although it said 2500 rows affected by my deletion. how can this be?
I don’t know. This is no longer, if it ever was, a WordPress question. You may want to check the MySQL support forums for expert advice.
Yes you are right, it just started here because it was wordpress site. I am figuring this out separately thanks