I have the following query and I want to make it a parameterized query.
In the database (mysql), data is type longblob. How do I represent that in the query?
db_query("UPDATE {tf_buyitframed} SET data = '$pxml', price = $price, thumb_fid = '$jpg' ,date='$date' WHERE bifid = $bifid LIMIT 1");
This is the almost finished query:
db_query("UPDATE {tf_buyitframed} SET data = '$pxml', price = %f, thumb_fid = '%s', date='%d' WHERE bifid = %d LIMIT 1", $price, $jpg, $date, $bifid);
Thanks.
I’d try the same as for a ‘normal’ blob, which would be
%b.See the source of db_type_placeholder() for the Drupal 6 mappings of Schema API field types to placeholders (Schema API would declare a longblob as type ‘blob’, with size ‘big’ – see Data types).