Hello,
I have $form->data['SchoolName'] which use 'DB Multi Record Loader' to select from database and display in a drop down list.
Then I need to get a school type from database based on school name selected. It works fine except if the school name has apostrophe; for example Children's miracle.
// get school type from school_lookup
$query = "
SELECT SchoolType
FROM `xxxxx_chronoforms_data_school_lookup`
WHERE `SchoolName` = '{$form->data['SchoolName']}';
";
When I select Children's miracle school, I received this message.
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 's miracle'' at line 3 SQL=SELECT SchoolType FROM `xxxxx_chronoforms_data_school_lookup` WHERE `SchoolName` = 'Children's miracle' "
Please advise.
Thank you,
Nilubon
I have $form->data['SchoolName'] which use 'DB Multi Record Loader' to select from database and display in a drop down list.
Then I need to get a school type from database based on school name selected. It works fine except if the school name has apostrophe; for example Children's miracle.
// get school type from school_lookup
$query = "
SELECT SchoolType
FROM `xxxxx_chronoforms_data_school_lookup`
WHERE `SchoolName` = '{$form->data['SchoolName']}';
";
When I select Children's miracle school, I received this message.
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 's miracle'' at line 3 SQL=SELECT SchoolType FROM `xxxxx_chronoforms_data_school_lookup` WHERE `SchoolName` = 'Children's miracle' "
Please advise.
Thank you,
Nilubon