When I'm trying to do this:
$query = "INSERT INTO news ( ";
$query .= "page_link,title,content,images,date";
$query .= ") VALUES ( ";
$query .= "'{$page_link}','{$title}','{$content}',''" . serialize($images_array) . "'','{$date}'";
$query .= ")";
I give this error :
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 'a:33:{i:0;s:76:\"http://www.example.com/wp-content/uploads/2016/07/Abc.jpg' at line 1
I'm sure it's for serialize($images_array)
because when I remove it other values will be inserted into database.
my array contains links of images.