[eluser]Scal[/eluser]
The controller is 180+ lines
Basically, this is the code failing:
$_sql = "DELETE FROM CodeIgniter_PhotosTags WHERE Photo_ID = ?; DELETE FROM CodeIgniter_PhotosAlbums WHERE Photo_ID = ?; INSERT INTO CodeIgniter_PhotosAlbums (Photo_ID, Album_ID) VALUES (?, ?);"
$_status = $this->db->query($_sql, array($ID, $ID, $ID, $this->input->post('PhotoAlbumID')));
$_sql being generated is:
DELETE FROM CodeIgniter_PhotosTags WHERE Photo_ID = '60'; DELETE FROM CodeIgniter_PhotosAlbums WHERE Photo_ID = '60'; INSERT INTO CodeIgniter_PhotosAlbums (Photo_ID, Album_ID) VALUES ('60', '5');
The error thrown is a MySQL DB error, not php code itself:
<h1>A Database Error Occurred</h1>
<p>Error Number: 1064</p><p>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 ';
DELETE FROM CodeIgniter_PhotosAlbums WHERE Photo_ID = '60'; INSERT INTO CodeIg' at line 1</p><p>DELETE FROM CodeIgniter_PhotosTags WHERE Photo_ID = '60'; DELETE FROM CodeIgniter_PhotosAlbums WHERE Photo_ID = '60'; INSERT INTO CodeIgniter_PhotosAlbums (Photo_ID, Album_ID) VALUES ('60', '5');</p>
Thanks