Closed (fixed)
Project:
Realname Userreference
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
18 May 2010 at 06:37 UTC
Updated:
2 Mar 2011 at 01:31 UTC
Hi,
I installed this module on my system which is running PostgreSQL. After using the new field I received the following error messages:
warning: pg_query() [function.pg-query]: Query failed: ERROR: LIMIT #,# syntax is not supported LINE 1: ...(n.realname LIKE '%te%') ORDER BY n.realname ASC LIMIT 0,10 ^ HINT: Use separate LIMIT and OFFSET clauses. in /var/www/drupal/includes/database.pgsql.inc on line 139.
user warning: query: SELECT n.realname, n.uid, u.name FROM realname n INNER JOIN users u ON n.uid = u.uid WHERE (n.realname LIKE '%sie%') ORDER BY n.realname ASC LIMIT 0,10 in /var/www/drupal/sites/all/modules/realname_userreference/realname_userreference.module on line 408.
warning: pg_query() [function.pg-query]: Query failed: ERROR: LIMIT #,# syntax is not supported LINE 1: ...realname LIKE '%test%') ORDER BY [...]
After I changed the code in line 403 from $limit_clause = ' LIMIT 0,'. $limit; to $limit_clause = ' LIMIT '. $limit; the module was working correctly.
P.S.: Are there any efforts to implement an option for a non case sensitive db query?
Comments
Comment #1
guillaumeduveauThanks ! No need for the LIMIT 0, $limit indeed, I wonder why I added that. I'll commit that soon with other things in a new release.
For the case-insensitive search with PostgreSQL : #1061342: Non case sensitive db query with PostgreSQL
Comment #2
guillaumeduveauFixed in CVS.
Comment #3
guillaumeduveau