views:

35

answers:

1

When I'm trying to delete an entry from a MySQL table using phpMyAdmin, I always have CONVERT and CAST in the delete query. Why do they appear and how can I get rid of them?

Example:

DELETE FROM `table` WHERE `table`.`field_1` = 3
AND CONVERT(`table`.`field_2` USING utf8) =
CAST(0x6338643263323430623864326531373436343263613537353165363038626431 AS BINARY) AND     
CONVERT(`table`.`field_3` USING utf8) = CAST(0x706f736974697665 AS BINARY) AND 
CONVERT(`table`.`field_4` USING utf8) = CAST(0x31 AS BINARY)
LIMIT 1

Thanks!

A: 

Don't try to get rid of this stuff!

It is phpmyadmin's way of making sure it correctly identifies the row you want deleted, making sure it does the WHERE comparisons using the appropriate character sets.

Ollie Jones