Welcome to Geeklog, Anonymous Saturday, December 03 2022 @ 02:09 pm EST

Geeklog Forums

Bug in Journal search


Status: offline

bedathur

Forum User
Newbie
Registered: 11/30/03
Posts: 12
Found a bug in Journal plugin's functions.inc file which causes an SQL error while doing a site search. On line 118 where the query is built, it should read UNIX_TIMESTAMP(je_date) instead of UNIX_TIMESTAMP(date) because there is no 'date' column in the gl_entry_table.


A sample sql error looks like this:


Fri 19 Dec 2003 05:14:49 PM CST - 1054: Unknown column 'date' in 'where
clause'. SQL in question: SELECT
je_id,je_summary,je_text,UNIX_TIMESTAMP(je_date) as day,'journal' as
type,jrn_name,jt_name,jrn_uid,je_hits FROM
gl_journal_entry,gl_journal_type,gl_journal WHERE ((jrn_id = je_jrn_id)
AND (jt_id = jrn_jt_id) AND (je_public = 1) AND (jrn_public = 1)) AND
((jrn_name like '%%') OR (je_text like '%%') OR (je_summary like '%%'))
AND (UNIX_TIMESTAMP(date) BETWEEN '1070949600' AND '1070953200') ORDER BY day DESC

 Quote

All times are EST. The time is now 02:09 pm.

  • 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