Warning: [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'an_(Decapolis)/2016_09_18_-_Day_06/2016-09-18_20160918_055416.jpg',NULL,'286','1' at line 1084
INSERT INTO piwigo_images
(id,file,name,date_available,path,representative_ext,storage_category_id,added_by)
VALUES('713','2016-09-13_0K3A0165.jpg','2016-09-13 0K3A0165','2016-10-28 15:12:51','./galleries/all_low/00_Transit/2016_09_13_-_Day_01/2016-09-13_0K3A0165.jpg',NULL,'331','1')
, ('714','2016-09-13_0K3A0167.jpg','2016-09-13 0K3A0167','2016-10-28 15:12:51','./galleries/all_low/00_Transit/2016_09_13_-_Day_01/2016-09-13_0K3A0167.jpg',NULL,'331','1')
, ('715','2016-09-13_20160913_145837.jpg','2016-09-13 20160913 145837','2016-10-28 15:12:51','./galleries/all_low/00_Transit/2016_09_13_-_Day_01/2016-09-13_20160913_145837.jpg',NULL,'331','1')
, ('716','2016-09-13_20160913_153852_HDR.jpg','2016-09-13 20160913 153852 HDR','2016-10-28 15:12:51','./galleri in /var/www/html/a_server.com/public_html/israel/gallery/include/dblayer/functions_mysqli.inc.php on line 832
While the DB entry didn't go through because the file had an ' in it as did another prior also, it seems that this isn't being detected early enough, and it still tried to push in through the DB, yet failed. So it seems the query failed, because it there was an error in the structure of the query. My guess is it shouldn't have even got the filename to the query in the first place, or it should have at least been escaped.
Just my thoughts.
Using Piwigo 2.8.2.
Hello, I thought I'd let you know of a problem I just encountered.
While my suggestion is a long shot, I had the following set of errors while attempting to do a "Database synchronisation with files: ./galleries/"
Warnings from the program.
```
[./galleries/all_low/29_Tel_Beit_She'an_(Decapolis)] PWG-UPDATE-1 (wrong filename)
[./galleries/all_low/51_Hezekiah's_Tunnel] PWG-UPDATE-1 (wrong filename)
[./galleries/all_low/73_Pre-Dinner_stop_(Al_Hasa,_Jordan)] PWG-UPDATE-1 (wrong filename)
[./galleries/all_low/Items_From_31_Qasr_El_Yahud_(Jordan_Baptism_Site)] PWG-UPDATE-1 (wrong filename)
[./galleries/all_low/Items_From_31_Qasr_El_Yahud_(Jordan_Baptism_Site)/31_Qasr_El_Yahud_(Jordan_Baptism_Site)] PWG-UPDATE-1 (wrong filename)
```
The actual SQL Error:
`Warning: [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'an_(Decapolis)/2016_09_18_-_Day_06/2016-09-18_20160918_055416.jpg',NULL,'286','1' at line 1084`
```
INSERT INTO piwigo_images
(id,file,name,date_available,path,representative_ext,storage_category_id,added_by)
VALUES('713','2016-09-13_0K3A0165.jpg','2016-09-13 0K3A0165','2016-10-28 15:12:51','./galleries/all_low/00_Transit/2016_09_13_-_Day_01/2016-09-13_0K3A0165.jpg',NULL,'331','1')
, ('714','2016-09-13_0K3A0167.jpg','2016-09-13 0K3A0167','2016-10-28 15:12:51','./galleries/all_low/00_Transit/2016_09_13_-_Day_01/2016-09-13_0K3A0167.jpg',NULL,'331','1')
, ('715','2016-09-13_20160913_145837.jpg','2016-09-13 20160913 145837','2016-10-28 15:12:51','./galleries/all_low/00_Transit/2016_09_13_-_Day_01/2016-09-13_20160913_145837.jpg',NULL,'331','1')
, ('716','2016-09-13_20160913_153852_HDR.jpg','2016-09-13 20160913 153852 HDR','2016-10-28 15:12:51','./galleri in /var/www/html/a_server.com/public_html/israel/gallery/include/dblayer/functions_mysqli.inc.php on line 832
```
While the DB entry didn't go through because the file had an ' in it as did another prior also, it seems that this isn't being detected early enough, and it still tried to push in through the DB, yet failed. So it seems the query failed, because it there was an error in the structure of the query. My guess is it shouldn't have even got the filename to the query in the first place, or it should have at least been escaped.
Just my thoughts.
Using Piwigo 2.8.2.
<!-- github-sync-id:185836256 -->
As per the screen shot.

<!-- github-comment-id:256833910 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Hello, I thought I'd let you know of a problem I just encountered.
While my suggestion is a long shot, I had the following set of errors while attempting to do a "Database synchronisation with files: ./galleries/"
Warnings from the program.
The actual SQL Error:
Warning: [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'an_(Decapolis)/2016_09_18_-_Day_06/2016-09-18_20160918_055416.jpg',NULL,'286','1' at line 1084While the DB entry didn't go through because the file had an ' in it as did another prior also, it seems that this isn't being detected early enough, and it still tried to push in through the DB, yet failed. So it seems the query failed, because it there was an error in the structure of the query. My guess is it shouldn't have even got the filename to the query in the first place, or it should have at least been escaped.
Just my thoughts.
Using Piwigo 2.8.2.
As per the screen shot.

related to #250
Fixed by https://github.com/Piwigo/Piwigo/commit/e8bef0cf23d1a1549de17f9c9598333bf78bd29f while fixing #250