mainSavannah Administration - Support: sr #110825, All forum posts show a database...

 
 

sr #110825: All forum posts show a database error message at the end

Submitter:  Bruno Haible <haible>
Submitted:  Fri 27 Jan 2023 11:49:40 AM UTC
 
Category:  Savannah website Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Assigned to:  ineiev Operating System:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Sun 29 Jan 2023 03:12:20 PM UTC, comment #1: 

Thank you, fixed.

Ineiev <ineiev>
Site Administrator
Fri 27 Jan 2023 11:49:40 AM UTC, original submission:  

At the end of forums posts, such as
https://savannah.gnu.org/forum/forum.php?forum_id=10255
or
https://savannah.gnu.org/forum/forum.php?forum_id=10287
a database error is shown:

db_query: SQL query error in [ SELECT u.user_name, u.realname, f.has_followups, u.user_id, f.msg_id, f.group_forum_id, f.subject, f.thread_id, f.body, f.date, f.is_followup_to, g.group_id FROM forum f, user u, forum_group_list g WHERE f.group_forum_id = '10255' AND user.user_id = forum.posted_by AND forum.is_followup_to = 0 AND g.group_forum_id = f.group_forum_id ORDER BY forum.date DESC LIMIT 0, 26] Unknown column 'user.user_id' in 'where clause'


Indeed it is invalid SQL. In the WHERE clause, the part

user.user_id = forum.posted_by AND forum.is_followup_to = 0

should be replaced with

u.user_id = f.posted_by AND f.is_followup_to = 0


Bruno Haible <haible>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ineiev (Posted a comment)
  • -email is unavailable- added by haible (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-29 ineiev StatusNone Done
        Assigned toNone ineiev
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.11