P. S: I do the select first because I need the ID anyway.
Hi!
First of all, MEDIUMBLOB type is case-sensitive.
I checked this sequence and everything worked as
expected. I think you have a mistake in your table.
What does "SHOW CREATE TABLE table" give?
Second, there is no needs to check that the value is already
presents using "SELECT" just to avoid an attempt of double
key value inserting. It is safe to insert without selecting.
After inserting you have just to check that really happened,
either record was inserted or error happened.
Why do you want to do iy