Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h1>A PHP feature request/bug report was filed...</h1> <p>See <a href="https://bugs.php.net/bug.php?id=52267" rel="nofollow noreferrer">https://bugs.php.net/bug.php?id=52267</a> which garnered the response from uw@php.net:</p> <blockquote> <p>...use <code>mysqli_set_charset()</code> to set the charset and then <code>SET NAMES</code> to change the collation.</p> </blockquote> <p>He/she also links to <a href="http://dev.mysql.com/doc/refman/5.1/en/mysql-set-character-set.html" rel="nofollow noreferrer">http://dev.mysql.com/doc/refman/5.1/en/mysql-set-character-set.html</a></p> <blockquote> <p>This function is used to set the default character set for the current connection. The string <code>csname</code> specifies a valid character set name. The connection collation becomes the default collation of the character set. This function works like the <code>SET NAMES</code> statement, but also sets the value of <code>mysql-&gt;charset</code>, and thus affects the character set used by <code>mysql_real_escape_string()</code></p> </blockquote> <p>And I'll link to <a href="http://dev.mysql.com/doc/refman/5.6/en/charset-collate.html" rel="nofollow noreferrer">http://dev.mysql.com/doc/refman/5.6/en/charset-collate.html</a> which shows how to make queries using whatever collation suits that query.</p> <blockquote> <p>With the COLLATE clause, you can override whatever the default collation is for a comparison. COLLATE may be used in various parts of SQL statements. Here are some examples:</p> </blockquote> <ul> <li><blockquote> <p>With <code>ORDER BY</code>:<br> <code>SELECT k FROM t1 ORDER BY k COLLATE latin1_german2_ci;</code></p> </blockquote></li> <li><blockquote> <p>With <code>AS</code>:<br> <code>SELECT k COLLATE latin1_german2_ci AS k1 FROM t1 ORDER BY k1;</code></p> </blockquote></li> <li><blockquote> <p>With <code>GROUP BY</code>:<br> <code>SELECT k FROM t1 GROUP BY k COLLATE latin1_german2_ci;</code></p> </blockquote></li> <li><blockquote> <p>With aggregate functions:<br> <code>SELECT MAX(k COLLATE latin1_german2_ci) FROM t1;</code></p> </blockquote></li> <li><blockquote> <p>With <code>DISTINCT</code>:<br> <code>SELECT DISTINCT k COLLATE latin1_german2_ci FROM t1;</code></p> </blockquote></li> <li><blockquote> <p>With <code>WHERE</code>:<br> <code>SELECT * FROM t1 WHERE _latin1 'Müller' COLLATE latin1_german2_ci = k; SELECT * FROM t1 WHERE k LIKE _latin1 'Müller' COLLATE latin1_german2_ci;</code></p> </blockquote></li> <li><blockquote> <p>With <code>HAVING</code>:<br> <code>SELECT k FROM t1 GROUP BY k HAVING k = _latin1 'Müller' COLLATE latin1_german2_ci;</code></p> </blockquote></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload