post-page

MySql Case Insensitive Order_by

2
responses
by
 
on
February 4th, 2004
in
Cool Scripts

While answering a question in the wordpress forums, I remembered an (obscure to me) function in php which generates a regular expressions ( regex ) to be used in a MySql query. This is very useful when performing a dynamic ORDER_BY or a SELECT and you do not want to use the LIKE statement. The syntax is as follows:
$new_string = mysql_regcase($string);
Where the $string was the original query string and the $new_string is the regex for that query string. I am not sure whether WordPress uses this or not. However, it sure could prove useful in unlikely circumstances.

heading
heading
2
Responses

 

Comments

  1. Mark (14 comments.) says:

    test

  2. Jason (1 comments.) says:

    Cool. I never knew this function existed.



Obviously Powered by WordPress. © 2003-2013

page counter
css.php