- Code: Select all
$sql->insert(array(
'table' => 'comments',
'values' => array(
'post_id' => $id,
'date' => $time,
'author' => $name,
'mail' => $mail,
'ip' => $_SERVER['REMOTE_ADDR'],
'comment' => $comments
)
));
The fix was to use this code instead:
- Code: Select all
'table' => 'comments',
'values' => array(
'date' => $time,
'author' => $name,
'mail' => $mail,
'ip' => $_SERVER['REMOTE_ADDR'],
'comment' => $comments,
'reply' => $reply,
'post_id' => $id)
));
The same thing with adding news, the actual table fields are not in the same order as the insert script that adds the news, newer mySQL defaults do not like this!
half of my news imports was rejected because url and title in news table was string type and not text type. Very bad, use TEXT TYPE for url and title in news table to avoid all possible errors!!!!!!
Another strange thing I noticed was the index ID for news table starts with 1 and story table starts with index 0 during convert. Not good!
