I write a simply query, work fine on phpmyadmin but if I run the same query in my php script with pdo no error was return and after few seconds db do a (I presume) rollback canceling my update

The query:

UPDATE tab SET whoweare = 'text 888', services = '', logo = '', copertina = '', galleria1 = '', galleria2 = '', galleria3 = '', galleria4 = '', indirizzo = 'input 1', tel_fisso = '', tel_mobile = '', orari = 'input 4', social_www = '', social_tw = '', social_fb = '', social_yt = '', social_lin = '' WHERE users_user='try' 
有帮助吗?

解决方案

You miss a whitspace on your query, try this one

UPDATE tab SET whoweare = 'text 888', services = '', logo = '', copertina = '', galleria1 = '', galleria2 = '', galleria3 = '', galleria4 = '', indirizzo = 'input 1', tel_fisso = '', tel_mobile = '', orari = 'input 4', social_www = '', social_tw = '', social_fb = '', social_yt = '', social_lin = '' WHERE users_user='try'

其他提示

Check that your database connection is actually being opened successfully and that the user you are connecting to the database as has permission to update that table.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top