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

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: Archived Bug Reports (https://community.mybb.com/forum-74.html)
+------ Forum: MyBB 1.4.2 (https://community.mybb.com/forum-100.html)
+------ 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: ""
Query:
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