Hi There,
i have a table where i copy a part of a record from another table in.
i use the code:
$insert_table = ‘ILP_rooster_TEMP’; // Table name
$insert_fields = array( // Field list, add as many as needed
‘wk_id’ => “’{wk_id}’”,
‘ev_id’ => “’{ev_id}’”,
‘wk_titel’ => “’{wk_titel}’”,
‘wk_conf_container’ => “’{wk_conf_container}’”,
);
// Insert record
$insert_sql = ‘INSERT INTO ’ . $insert_table
. ’ (’ . implode(’, ‘, array_keys($insert_fields)) . ‘)’
. ’ VALUES (’ . implode(’, ', array_values($insert_fields)) . ‘)’;
sc_exec_sql($insert_sql);
Works fine. but with some records iget an error. i saw that that record had a field uses ’ in the text that causes the error.
so i have to modify ( i think this part of ) the code
‘wk_titel’ => “’{wk_titel}’”,
to get it working so that it also copy’s html text with ’ in it. but, can’t get it working…
any suggestions?