I’m inserting into my database here with parameters from the form.
The form has 4 input fields (current_no, current_street, current_city, current_state). I’ve set it up so that the client can display each of these values on the web page, but what they want is to be able to view these values in a single column.
so basically from…
current_no | current_street | current_city | current_state
to…
| current_no current_street current_city current_state |
I decided I’d add another column to the table that’ll store this “full” value and I figured that populating it would probably be easy but I think I’m missing something here:
insert into customers(current_address) values (current_no + ' ' + current_street + ' ' + current_city + ' ' + current_state)
Although this doesn’t give me any errors, it only inserts the current_no value into the column.
How can I concatenate all the values (string types) into the column on database side?
Thanks in advance for any help!
in
mySQLuseCONCAT()or CONCAT_WS()