Can an update be made with dblink?

0

I want to update from one database to another with the dblink in postgres as seen:

SELECT * FROM dblink_exec('dbname=sie7','update catalogo_organizaciones set activacion_tablas=0 where rfc= 'LIMJ930210HDZ' ')

in postgresql it runs fine but when I pass the query to php I get the following error:

  

ERROR: syntax error at or near "LIMJ930210HDZ" LINE 1: ... rganizaciones set activacion_tablas = 0 where rfc = 'LIMJ930210 ... ^

Someone knows why it happens.

    
asked by Manuel Lira 01.12.2017 в 20:53
source

1 answer

0

You can check well that if you are using the quote type correctly when you are using it in PHP, remember "double quotes if the string within these quotes is with single quotes" '.

    
answered by 01.12.2017 в 21:12