Changeset 436152
- Timestamp:
- 09/11/2011 12:00:04 AM (15 years ago)
- Location:
- postgresql-for-wordpress/trunk
- Files:
-
- 2 edited
-
pg4wp/driver_pgsql.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
postgresql-for-wordpress/trunk/pg4wp/driver_pgsql.php
r436145 r436152 130 130 error_log("Error running :\n$initial\n---- converted to ----\n$sql\n----\n$err\n---------------------\n", 3, PG4WP_LOG.'pg4wp_errors.log'); 131 131 132 if( $catchnumrows && $GLOBALS['pg4wp_result'] !== false)133 {134 $GLOBALS['pg4wp_numrows_query'] = $sql;135 if( PG4WP_DEBUG)136 error_log( "Number of rows required for :\n$sql\n---------------------\n", 3, PG4WP_LOG.'pg4wp_NUMROWS.log');137 }138 132 return $GLOBALS['pg4wp_result']; 139 133 } … … 167 161 168 162 $logto = 'queries'; 169 // This is used to catch the number of rows returned by the last "SELECT" REQUEST170 $catchnumrows = false;171 163 // The end of the query may be protected against changes 172 164 $end = ''; … … 181 173 if( false !== strpos($sql, 'SQL_CALC_FOUND_ROWS')) 182 174 { 183 $catchnumrows = true;184 175 $sql = str_replace('SQL_CALC_FOUND_ROWS', '', $sql); 176 $GLOBALS['pg4wp_numrows_query'] = $sql; 177 if( PG4WP_DEBUG) 178 error_log( "Number of rows required for :\n$sql\n---------------------\n", 3, PG4WP_LOG.'pg4wp_NUMROWS.log'); 185 179 } 186 180 elseif( false !== strpos($sql, 'FOUND_ROWS()')) 187 181 { 188 // Here we need toconvert the latest query into a COUNT query182 // Here we convert the latest query into a COUNT query 189 183 $sql = $GLOBALS['pg4wp_numrows_query']; 190 184 // Remove any LIMIT ... clause (this is the blocking part) -
postgresql-for-wordpress/trunk/readme.txt
r436146 r436152 5 5 Requires at least: 2.5.1 6 6 Tested up to: 3.2.1 7 Stable tag: 1.2. 17 Stable tag: 1.2.2 8 8 9 9 PostgreSQL for WordPress is a special 'plugin' enabling WordPress to be used with a PostgreSQL database. … … 43 43 44 44 == Changelog == 45 46 = 1.2.2 = 47 * Corrected SQL_CALC_FOUND_ROWS handling, was broken by the latest code reorganisation 45 48 46 49 = 1.2.1 =
Note: See TracChangeset
for help on using the changeset viewer.