logo

Palette - Make it Colorful🎨

Palette - Visual Page Builder, no design degree required.

Live Demo Download Palette

Scroll

I cannot execute the delete request with LIMIT.

22/02/2025, by Anonymous (not verified)
I cannot execute this code

$query = db_query_range('
DELETE FROM {my_table}
WHERE some_col LIKE :t', 0, $limit, 
array(':t'=>'%delete rows containing this phrase%'))->execute();

It throws a PDO exception
The query looks like this

DELETE FROM my_table
WHERE some_col LIKE '%delete rows containing this phrase%'
LIMIT 0, 5

but MySQL accepts LIMIT 5 but not LIMIT 0, 5