I want to add an extra value to a mysql table column, e.g:
the field 'photos' already has an image name in, but i want to add another image name into the field using php.
I thought INSERT would just add it in on top but it seems to replace the existing image name. I want to avoid selecting the current field values, adding the new value and re-inserting if possible.
thanks!
code:
php:
$query = "INSERT INTO `listings-rent` (photos) VALUES ('$fileName') WHERE id = '$insertID'";
mysqli_query($mysqli, $query);
the problem is this replaces the existing value in the 'photos' column, rather than adding to it