Insert + sign into a table field with PHP

Asked

Viewed 16 times

0

Follow the SQL command of the Insert that I need to insert in the table, the database is Postgres.

'''INSERT INTO pneu_templates (ds_template, cd_brand, cd_usercadastro) VALUES (UPPER('test+'), 86, 0) RETURNING cd_model '''

when I call this Insert inside PHP it saves the record but the + sign is not only saved the word (test) need some validation to be able to save the + sign as well.

  • Try this way: INSERT INTO pneu_templates (ds_template, cd_brand, cd_usercadastro) VALUES ( Concat(UPPER('test'),'+'), 86, 0) RETURNING cd_model

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.