SELECT [DISTINCT] SQL_CALC_FOUND_ROWS
-
Any reason you don’t grep for valid sql between SELECT and SQL_CALC_FOUND_ROWS (line 847 in v1.7)?
I modified my install of v1.7 to this to overcome issues with plugins that happen to select distinct sql_calc_found_rows from this:
if ( preg_match(‘/^\s*SELECT\s+SQL_CALC_FOUND_ROWS\s/i’, $query) ) {
to this:
if ( preg_match(‘/^\s*SELECT.*?\s+SQL_CALC_FOUND_ROWS\s/i’, $query) ) {
Not sure if there’s big implications for that but I don’t see why not ? You could put any other sort of flags or statements in there for a normal select. Seems arbitrary not to allow for it, unless I am mistaken? (it happens a lot ?? )
- The topic ‘SELECT [DISTINCT] SQL_CALC_FOUND_ROWS’ is closed to new replies.