Welcome to Geeklog, Anonymous Saturday, November 30 2024 @ 01:50 am EST
Geeklog Forums
SQL Error - Topics - New 1.39 Installation
Status: offline
robyoung
Forum User
Newbie
Registered: 03/19/04
Posts: 2
Account Preferences
Select checkbox to not show a topic
Save
An SQL error has occured. Please see error.log for details.
.../geeklog/public_html/usersettings.php?mode=preferences&msg=6
Fri Mar 19 19:56:42 2004 - 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND (tid NOT IN ('GeekLog')) ORDER BY sortnum' at line 1. SQL in question: SELECT tid,topic,owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon FROM gl_topics AND (tid NOT IN ('GeekLog')) ORDER BY sortnum
Have to use browser back button, deselect topics, save again then error not displayed.
Any ideas? I don't use topics a whole lot so if it is possible to simply remove the ability for a user to select which topics they want to see, i'm up for that.
Select checkbox to not show a topic
Save
An SQL error has occured. Please see error.log for details.
.../geeklog/public_html/usersettings.php?mode=preferences&msg=6
Fri Mar 19 19:56:42 2004 - 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND (tid NOT IN ('GeekLog')) ORDER BY sortnum' at line 1. SQL in question: SELECT tid,topic,owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon FROM gl_topics AND (tid NOT IN ('GeekLog')) ORDER BY sortnum
Have to use browser back button, deselect topics, save again then error not displayed.
Any ideas? I don't use topics a whole lot so if it is possible to simply remove the ability for a user to select which topics they want to see, i'm up for that.
7
6
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Yep, that's a bug.
In lib-common.php, in function COM_showTopics(), change this line:
to read
i.e. replace the "AND" with "WHERE".
That should fix it.
bye, Dirk
In lib-common.php, in function COM_showTopics(), change this line:
Text Formatted Code
$sql .= " AND (tid NOT IN ('" . str_replace( ' ', "','", $tids )Text Formatted Code
$sql .= " WHERE (tid NOT IN ('" . str_replace( ' ', "','", $tids )That should fix it.
bye, Dirk
6
7
Quote
All times are EST. The time is now 01:50 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content