I am trying to update a table column by appending some text to the existing value in the column.
Basically, I am trying to do something like this:
$wpdb->update('table_name',
array('notes' => notes + 'some text here to append'))
,array('note_id' => 313)
);
Is this possible?
I am trying to update a table column by appending some text to the existing value in the column.
Basically, I am trying to do something like this:
$wpdb->update('table_name',
array('notes' => notes + 'some text here to append'))
,array('note_id' => 313)
);
Is this possible?
Short answer: it's not possible.
Long answer: you should try $wpdb->query
instead and write a regular SQL query, something like this:
UPDATE table_name SET notes = CONCAT(notes, 'text to append') WHERE note_id = '313'
Please note it's only an example and you should use $wpdb->prepare
to also sanitize variables properly.