I’m trying to insert the data using PDO but it’s not working. I echo and it shows all the data that’s being inserted, but it doesn’t do it:
for($f=0; $f<count($bookSpoke4); $f++){
$insert = "INSERT INTO ".strtolower($bookTitle[0]).$chapter[0]." (date_time, book_spoke, chapter_spoke, rel_book, rel_book_title, rel_chapter, summary, url_links)
VALUES ('".date("Y-m-d H:i:s")."', ".$bookSpoke4[$f].", ".$chapterSpoke4[$f].", ".$book4[$f].", '".$bookTitle4[$f]."', ".$chapter4[$f].", '', 'spoke=".$spoke."&b1=".$b1."&c1=".$c1."&b2=".$book4[$f]."&c2=".$chapter4[$f]."')";
echo $insert."<br /><br /><br />";
//$affected_rows = $db->exec($insert);
$db->exec($insert);
}
//$db->commit();