1
I’m doing a query in a table. The field filiais returns the following value
["005","001"]
I wanted to directly in the query turn this string(varchar) into:
['005','001']
With the simple quotes
My query
SELECT * FROM bancos WHERE ativo=1
1
I’m doing a query in a table. The field filiais returns the following value
["005","001"]
I wanted to directly in the query turn this string(varchar) into:
['005','001']
With the simple quotes
My query
SELECT * FROM bancos WHERE ativo=1
2
Use the function REPLACE mysql:
SELECT REPLACE(filiais, "\"", "\'") FROM bancos WHERE ativo = 1
The first parameter is the column in which the function will be executed, the second is the old character and the third is the new character.
That’s right!! vlw!!
Browser other questions tagged mysql
You are not signed in. Login or sign up in order to post.
['005','001']already is the raw value returned by query, right?– André Ribeiro