Difference between revisions of "User:Subfader/ignorecase titlematch"

From FollowTheScore
Jump to: navigation, search
Line 33: Line 33:
 
|}
 
|}
  
== SOLUTION ==
+
== Solution ==
  
 
Add <code>WHERE BINARY </code> instead of <code>LOWER(CAST(...))</code>: http://stackoverflow.com/questions/7857669/mysql-case-sensitive-query
 
Add <code>WHERE BINARY </code> instead of <code>LOWER(CAST(...))</code>: http://stackoverflow.com/questions/7857669/mysql-case-sensitive-query

Revision as of 16:36, 16 November 2014

{{#dpl:
 |debug=3
 |namespace=
 |titlematch=%LoadTest%
 |count=10
}}

{{#dpl:
 |debug=3
 |namespace=
 |titlematch=%loadtest%
 |ignorecase=true
 |count=10
}}

Extension:DynamicPageList (DPL), version 3.2.1: Warning: No results.

Solution

Add WHERE BINARY instead of LOWER(CAST(...)): http://stackoverflow.com/questions/7857669/mysql-case-sensitive-query

For titlematch:

if ($bIgnoreCase) $sSqlWhere .= ' BINARY ' . $sPageTable.'.page_title' . $sTitleMatchMode .  $dbr->addQuotes($link) ;

Would need to be added to every $bIgnoreCase I guess.