1 Replies - 351 Views - Last Post: 01 February 2014 - 10:31 PM Rate Topic: -----

#1 alex71385  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 74
  • Joined: 27-October 09

Wrong value type sent to the database. Integer expected. (modified_tim

Posted 01 February 2014 - 09:47 PM

Please help me solve this, I'm in process of converting forum and while it's running the script, I am getting error:

Wrong value type sent to the database. Integer expected. (modified_time)

I looked at the SQL code, and there are only two instances of it:
/******************************************************************************/
--- Converting posts ( part 1 - this may take some time)...
/******************************************************************************/

TRUNCATE {$to_prefix}messages;
TRUNCATE {$to_prefix}attachments;

---* {$to_prefix}messages 200
---{
$ignore = true;
---}

SELECT
	c.id_msg AS id_msg, ft.TOPIC_ID AS id_topic, ft.FORUM_ID AS id_board, ft.T_SUBJECT AS subject,
	UNIX_TIMESTAMP(REPLACE(ft.T_DATE, '\0', '')) AS poster_time, ft.T_AUTHOR AS id_member,
	ft.T_IP AS poster_ip, IFNULL(ftm.real_name, '') AS poster_name,
	REPLACE(REPLACE(T_MESSAGE, '\n', '<br />'), '\r', '') AS body,
	IFNULL(ftm.email_address, '') AS poster_email, fte.real_name AS modified_name,
	UNIX_TIMESTAMP(REPLACE(ft.T_LAST_EDIT, '\0', '')) AS modified_time
FROM {$to_prefix}convert AS c
	LEFT JOIN {$from_prefix}FORUM_TOPICS AS ft ON (c.old_id_topic = ft.TOPIC_ID)
	LEFT JOIN {$to_prefix}members AS ftm ON (ftm.id_member = ft.T_AUTHOR)
	LEFT JOIN {$to_prefix}members AS fte ON (fte.id_member = ft.T_LAST_EDITBY)
WHERE c.type = 'topic';
---*

/******************************************************************************/
--- Converting posts ( part 2 - this may take some time)...
/******************************************************************************/

---* {$to_prefix}messages 200
SELECT
	c.id_msg AS id_msg, fr.TOPIC_ID AS id_topic, fr.FORUM_ID AS id_board, ft.T_SUBJECT AS subject,
	UNIX_TIMESTAMP(REPLACE(fr.R_DATE, '\0', '')) AS poster_time, fr.R_AUTHOR AS id_member,
	fr.R_IP AS poster_ip, IFNULL(ftm.real_name, '') AS poster_name,
	REPLACE(REPLACE(R_MESSAGE, '\n', '<br />'), '\r', '') AS body,
	IFNULL(ftm.email_address, '') AS poster_email, fte.real_name AS modified_name,
	UNIX_TIMESTAMP(REPLACE(fr.R_LAST_EDIT, '\0', '')) AS modified_time
FROM {$to_prefix}convert AS c
	INNER JOIN {$from_prefix}FORUM_TOPICS AS ft ON (c.old_id_topic = ft.TOPIC_ID)
	INNER JOIN {$from_prefix}FORUM_REPLY AS fr ON (c.old_id_msg = fr.REPLY_ID)
	LEFT JOIN {$to_prefix}members AS ftm ON (ftm.id_member = fr.R_AUTHOR)
	LEFT JOIN {$to_prefix}members AS fte ON (fte.id_member = fr.R_LAST_EDITBY)
WHERE c.type = 'msg';
---*



I've got to get these forums up and running and can't go to bed until this is figured out, please please please help me figure this out. Thank you.

Is This A Good Question/Topic? 0
  • +

Replies To: Wrong value type sent to the database. Integer expected. (modified_tim

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8962
  • View blog
  • Posts: 33,585
  • Joined: 12-June 08

Re: Wrong value type sent to the database. Integer expected. (modified_tim

Posted 01 February 2014 - 10:31 PM

I would suggest running your queries in your management software, see what is being returned, why it is not an integer, and correcting as needed.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1