Hi
when I insert a row using the execute thing in PDO it works fine unless there's a comma in the string
here's the insert function :
function insertQuery($conn,$sql){
$sth = $conn -> prepare($sql);
$sth->execute();
$insertId = $conn->lastInsertId();
return $insertId;
}
when the $sql looks like this
INSERT INTO `page_content` ( cont_id, p_id, p_lang, p_slug, p_meta_title, p_meta_desc, p_meta_keys, p_h1_title, p_h2_title, p_content ) VALUES ('',25,'fr','nos_offres_d_emploi','','','','Nos offres d'emploi','Nos offres d'emploi','')
it fails to insert, so I guess the prepare isn't working
- how can I print the $sql AFTER the prepare($sql) to check if it's being escaped ?
- what could be preventing the prepare from working ?
thanks for any help you can give with this