The Irish are messing up my data input!
So, I have this simple code, it reads an employee contact table and put's into a different table for a schedule and this new employee O'Malley is giving me this error:
Insert Error - Line 45: Token MALLEY was not valid. Valid tokens: ) ,. SQLCODE=-104
Here's my code that is giving me issues:
$name = addslashes(rtrim($row['SNAME']));
$type = addslashes(rtrim($row['STYPE']));
$sempno addslashes(rtrim($row['SEMPNO']));
$insert = "INSERT INTO internet.day_sched(EID, NAME, DEPT, SCHED, FAX, LUNCH, TAG, IN, OUT)
VALUES('$sempno', '$name', '$type', 'x', 'x', 'x', 'Y', 'x' ,'x')";
$execINSERT = db2_exec($i5db2, $insert)
or die("Insert Error - Line 45: " . db2_stmt_errormsg());
I'm adddingslashes and if I echo it out I can see slashes are being added but it's still bombing out on me? Not sure what I'm missing and I don't want to remove the single quote, as it is part of their name.
Any insight would be appreciated!
Thanks,
j