MyBB Community Forums

Full Version: SQL Error with MySessions Plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I just installed the MySessions Plugin found on following URL:
https://community.mybb.com/mods.php?action=download&pid=424


I then had a few SQL Errors when trying to activate it, which i were able to fix with following Solution: https://community.mybb.com/thread-238192.html

After i fixed them, successfully activated the plugin, visited the MySession Plugin in the UserCP i got another SQL Error about which this Thread is about:
[Image: SQL-Error-My-Sessions.png]

Now the SQL Syntax is written by the Plugin Developer, I assume he checked the Plugin's Functionality before releasing it on the Extension Page.
That's why i don't understand, how the Syntax is Invalid and how i should edit the pluginfile found in inc/plugins/mysession.php in order to fix that Error.


Regards,
Infinimonster
Open inc/plugins/mysessions.php and go to line 360 (just before the line $limit .= " LIMIT ".(($pagenum-1)*10).", 10";
Then add:
if ((int)$pagenum<1) { $pagenum=1; }
(2023-05-04, 07:38 AM)Crazycat Wrote: [ -> ]Open inc/plugins/mysessions.php and go to line 360 (just before the line $limit .= " LIMIT ".(($pagenum-1)*10).", 10";
Then add:
if ((int)$pagenum<1) { $pagenum=1; }

Thant fixed the issue and now the page show without SQL Error however it seem that the Plugin donÄt show the active sessions correctly and don't (like other plugins) automatically use the button style from the theme.

[Image: No-Items-My-Session.png]