I am using events to insert values into another table.
Everything works well with all fields expect the email field. I want to insert the email record into another table;
My EMAIL field in both tables are viewed as "Email Hyperlink" - is that the reason? I want to maintain the Hyperlink.
My Event code is
//**** Save new data in another table ****
global $conn,$strTableName;
$strSQLSave = "INSERT INTO _1ee0 (StudentNumber, FirstName, LastName, Email) values (";
$strSQLSave .= $values["StudentNumber"].",";
$strSQLSave .= $values["FirstName"].",";
$strSQLSave .= $values["Lastname"].",";
$strSQLSave .= $values["Email"];
$strSQLSave .= ")";
db_exec($strSQLSave,$conn);
return true;
// return true if you like to proceed with adding new record
// return false in other case**
This code works if i remove the email field - which i cant afford to do..
The error message is:
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 ''aaaa@bbbbb.cc')' at line 1
Any suggestions?