Ticket #115 (closed defect: fixed)

Opened 11 months ago

Last modified 11 months ago

SQLite Searching is Broken

Reported by: elasticdog Owned by: ringmaster
Priority: major Milestone: 0.4
Component: Habari Core Software Version: SVN
Keywords: sqlite database search Cc: aaron@…

Description

Running rev1293 of Habari and using SQLite v3.5.4, the search functionality is broken. Issuing a search with no searchterm will load a page just fine, but putting anything else in search box will error and give you a blank page in the web browser.

In the admin interface, the error log shows:

theme January 17, 2008 PDO::prepare() [function.PDO-prepare]: SQLSTATE[HY000]: General error: 1 no such function: CONCAT in /srv/www/nginx/elasticdog.com/habari/system/classes/error.php line 80

Change History

Changed 11 months ago by ringmaster

  • owner set to ringmaster
  • status changed from new to assigned

Proper CONCAT syntax in SQLite is different than MySQL. The proper SQL statement would look like this:

$where[] .= "(title LIKE '%' ? '%' OR content LIKE '%' ? '%')";

This needs to be integrated into the sql_t() function in the SQLite DatabaseConnection class.

Changed 11 months ago by ringmaster

  • status changed from assigned to closed
  • resolution set to fixed

In r1294.

Note: See TracTickets for help on using tickets.