Possible to use MySQL functions in insert, update, replace?
I cannot figure out how to use MySQL functions, such as NOW(), in $wpdb->insert(), ->update() or ->replace()? The same is true of a MySQL bit string (e.g., v=b’0101010′). None of the available data types (%d, %s, %f) seem to allow them through.
The only way I have been able to do this is by doing my own “prepare” and then using $wpdb->query() with “INSERT INTO … “, “UPDATE …” or “REPLACE…”.
If I have missed how to do this, please let me know. Otherwise, it would be nice to have %b for bit strings (b’xxxx’) rather than %s and also %u (or something) that does not do any quoting or processing of that replacement value (e.g., NOW(), or any MYSQL function or calculation).
- The topic ‘Possible to use MySQL functions in insert, update, replace?’ is closed to new replies.