Have a question about CiviCRM? Get it answered quickly at the new CiviCRM Stack Exchange Q+A siteThis forum was archived on 25 November 2017. Learn more.How to get involved.What to do if you think you've found a bug.
[info] $Fatal Error Details = Array( [callback] => Array ( [0] => CRM_Core_Error [1] => handle ) [code] => -1 [message] => DB Error: unknown error [mode] => 16 [debug_info] => INSERT INTO civicrm_phone (contact_id , location_type_id , is_primary , is_billing , phone , phone_ext , phone_type_id ) VALUES ( 2 , 1 , 1 , 0 , '123-456-7890' , NULL , 1 ) [nativecode=1305 ** FUNCTION db_civicrm.civicrm_strip_non_numeric does not exist] [type] => DB_Error [user_info] => INSERT INTO civicrm_phone (contact_id , location_type_id , is_primary , is_billing , phone , phone_ext , phone_type_id ) VALUES ( 2 , 1 , 1 , 0 , '123-456-7890 , NULL , 1 ) [nativecode=1305 ** FUNCTION db_civicrm.civicrm_strip_non_numeric does not exist] [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_phone (contact_id , location_type_id , is_primary , is_billing , phone , phone_ext , phone_type_id ) VALUES ( 2 , 1 , 1 , 0 , '123-456-7890' , NULL , 1 ) [nativecode=1305 ** FUNCTION db_civicrm.civicrm_strip_non_numeric does not exist]"])
I tried rebuilding the trigger and it didn't work.
[nativecode=1305 ** FUNCTION mydb.civicrm_strip_non_numeric does not exist]"]
CREATE FUNCTION civicrm_strip_non_numeric(input VARCHAR(255) CHARACTER SET utf8) RETURNS VARCHAR(255) CHARACTER SET utf8 DETERMINISTIC NO SQL BEGIN DECLARE output VARCHAR(255) CHARACTER SET utf8 DEFAULT ''; DECLARE iterator INT DEFAULT 1; WHILE iterator < (LENGTH(input) + 1) DO IF SUBSTRING(input, iterator, 1) IN ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9') THEN SET output = CONCAT(output, SUBSTRING(input, iterator, 1)); END IF; SET iterator = iterator + 1; END WHILE; RETURN output; END
#1064 - 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 '' at line 6