MyBB Community Forums
[F] SQL error when editing thread - Printable Version

+- MyBB Community Forums (
+-- Forum: Community Archive (
+--- Forum: Archived Forums (
+---- Forum: Archived Development and Support (
+----- Forum: Archived Bug Reports (
+------ Forum: MyBB 1.4.2 (
+------ Thread: [F] SQL error when editing thread (/thread-40378.html)

[F] SQL error when editing thread - kvikkjokk - 2008-11-12

I'm running 1.4.2. When I edit (quick edit) an existing thread and click on save changes I get

MyBB SQL Error
MyBB has experienced an internal SQL error and cannot continue.
SQL Error:
0 - ERROR: invalid input syntax for integer: ""
DELETE FROM mybb_threadsubscriptions WHERE uid='' AND tid='10'

This is with Postgresql 8.2.9.

Funny enough when looking at the thread the changes where successfully made.

RE: SQL error when editing thread - Ryan Gordon - 2008-11-16

Try this; in inc/datahandlers/post.php find:

$db->delete_query("threadsubscriptions", "uid='{$post['uid']}' AND tid='{$post['tid']}'");

replace with

$db->delete_query("threadsubscriptions", "uid='".intval($post['uid'])."' AND tid='".intval($post['tid'])."'");

[F] SQL error when editing thread - Ryan Gordon - 2008-11-20

Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group