 <p>The problem is case-sensitivity. MySQL identifiers are not case sensitive unless you enclose them in backticks. However, PHP array indexes <em>are</em>. </p> <p>Therefore if you have a column named <code>CourseName</code>, the following query <em>will</em> work:</p> <pre><code>SELECT * FROM course WHERE cOuRSEnaME = 'foo' ORDER BY courSEnAmE </code></pre> <p>But, referencing it in PHP as <code>$row['coursename']</code>, <code>$row['cOURsENamE']</code> or any other differing combination will not work, as these all refer to <em>different</em> keys. You must use <code>$row['CourseName']</code>.</p> <p>See also: <a href="http://stackoverflow.com/questions/1511230/php-array-are-array-indexes-case-sensitive">PHP array, Are array indexes case sensitive?</a></p>