update che non funziona:
codice:
UPDATE impost_fatture SET logo='$_POST[logo]', read='$_POST[read]', write='$_POST[write]', intestazione='$_POST[intestazione]' WHERE id_agenzia=$_SESSION[id_agenzia]
Questa e la tabella:
codice:
CREATE TABLE `impost_fatture` (
`id_agenzia` int(11) NOT NULL,
`logo` int(1) NOT NULL,
`intestazione` text NOT NULL,
`read` int(1) default NULL,
`write` int(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
questo e l'errore:
codice:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'read='1', write='1', intestazione='fdfdfdfgdf
dfgfdgfdgf
questo e un print_r dell'aray _POST
codice:
Array ( [logo] => 1 [max_file_size] => 50000 [read] => 1 [write] => 1 [intestazione] => fdfdfdfgdf
dfgfdgfdgf
visov )
E piu di un'oretta che guardo la update il bello che la insert into sulla stessa tabella funziona.