salve, come mai in questo codice mi da errore di sintassi quando cerca di gettarmi le pagine in php (semplice html), dentro il db mi da errore di sintassi.
tutto il db me lo crea e anche altri dati.. ma non vuole mettermi le pagine già fatte per far prima invece di far da capo una a una.codice:$query = "INSERT INTO `pages` (`url`, `title`, `content`, `active`,`data_reg`) VALUES ('about', 'Chi sono?', '".file_get_contents("../pages/about.php")."','1',Now());"; $stmt = $db->prepare( $query ); $stmt->execute();
l'errore è questo:
idea?codice:Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 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 'uso del computer</span> (ECDL)</p> <h2>Curriculum Vitae</h2> <p><a href="' at line 1' in D:\xampp\htdocs\db\setup\install.php:9 Stack trace: #0 D:\xampp\htdocs\db\setup\install.php(9): PDOStatement->execute() #1 {main} thrown in D:\xampp\htdocs\db\setup\install.php on line 9
grazie mille e buona domenica.

Rispondi quotando