MySQL syntax [closed]

0

I can not see the error:

UPDATE clientes SET 
txtEndereco=\"Rua Xingú, 823\", 
txtBairro=\"Val Paraíso\", 
txtCEP=\"09060-050\", 
txtUF=\"35\",
txtCidade=\"14933\",
regiaos=\"\",
Obs=\"Princesa fada\") 
WHERE idCliente = \"2\
  

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server for the right syntax to use near '\ "Street Xingú, 823 \", txtBairro = \ "Val ParaÃso \", txtCEP = \ "09060-050 \", txtUF = \ " 3 'at line 1

    
asked by anonymous 13.10.2016 / 15:46

1 answer

3

It has to be used with single quotation marks and does not necessarily have to escape them, unless the word has the character of the quotation marks in its string.

UPDATE clientes SET 
txtEndereco = 'Rua Xingú, 823', 
txtBairro = 'Val Paraí­so', 
txtCEP = '09060-050', 
txtUF = 35,
txtCidade = '14933',
regiaos = '',
Obs = 'Princesa fada'
WHERE idCliente = 2
    
13.10.2016 / 15:53