Problems with PEAR::DB limitQuery

From: Date: Mon, 08 Dec 2003 14:31:43 +0000
Subject: Problems with PEAR::DB limitQuery
Groups: php.pear.dev php.pear.general 
Request: Send a blank email to pear-dev+get-24264@lists.php.net to get a copy of this message
I found with an aplication I started using the the limitQuery method has problems with PostgreSQL. Basically, in PostgreSQL (don't know hpow others do it) you do a: LIMIT count OFFSET start Where start and count are self explained. So, in DB/pgsql.php, this: // }}} // {{{ modifyLimitQuery() function modifyLimitQuery($query, $from, $count) { $query = $query . " LIMIT $count, $from"; return $query; } Should be changed to this: // }}} // {{{ modifyLimitQuery() function modifyLimitQuery($query, $from, $count) { $query = $query . " LIMIT $count OFFSET $from"; return $query; } Good luck! -- select 'mmarques' || '@' || 'unl.edu.ar' AS email; ----------------------------------------------------------------- Martín Marqués | mmarques@unl.edu.ar Programador, Administrador, DBA | Centro de Telemática Universidad Nacional del Litoral -----------------------------------------------------------------

« previous php.pear.dev (#24264) next »