Page 1 of 1

DNCdotCOM

PostPosted: Thu Oct 13, 2022 4:53 pm
by GenXOutsourcing
We are trying to setup the dnc.com using the script already in Vicidial. The issue I am having is that for some reason on the city "Coeur D'Alene" the script errors out because of the D'Alene.


DBD::mysql::db do failed: 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 'Alene,6010

it doesnt like the apostrophe in the city name when adding to the log at line 361

check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Fallon,9787;ILEC;"CenturyTel of Missouri LLC:CenturyLink",,20,8:00-21:00;8:00...' at line 1 at AST_DNCcom_filter.pl line 361.

Re: DNCdotCOM

PostPosted: Fri Oct 28, 2022 3:43 pm
by williamconley
You should post this in the Issue Tracker after updating to the latest version (in case this has already been addressed).

If you have the solution written (using the mysqli_real_escape_string function to pre-process the sql string perhaps), you can certainly include that.

Note that some documentation omits the need in that function to include a pre-linked $DBLink variable so the system can check the mysql version to properly escape the string.

I forget it if's mysqli_real_escape_string($DBLink,$Query) or mysqli_real_escape_string($Query,$DBLink), but without the link the function has no basis to "know" the proper escape-required values.