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

From FollowTheScore
Jump to: navigation, search
(Solution)
 
(2 intermediate revisions by the same user not shown)
Line 35: Line 35:
 
== Solution ==
 
== Solution ==
  
Add <code>WHERE BINARY </code> instead of <code>LOWER(CAST(...))</code>: http://stackoverflow.com/questions/7857669/mysql-case-sensitive-query
+
LOWER('.$sPageTable.'.page_title)
  
For titlematch:
+
http://stackoverflow.com/questions/2876789/case-insensitive-for-sql-like-wildcard-statement
if ($bIgnoreCase) $sSqlWhere .= ' BINARY ' . $sPageTable.'.page_title' . $sTitleMatchMode .  $dbr->addQuotes($link) ;
 
 
 
Would need to be added to every <code>$bIgnoreCase</code> I guess.
 

Latest revision as of 16:53, 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

LOWER('.$sPageTable.'.page_title)

http://stackoverflow.com/questions/2876789/case-insensitive-for-sql-like-wildcard-statement