 <p>that is not actually mysql_fetch_array error. this error message says that this function's argument is wrong.<br> and this argument returned by mysql_query() function<br> so it means that there was an error during query execution, on the mysql side.<br> ans mysql has plenty of error messages, quite informative ones.</p> <p>Thus, instead of <em>guessing</em>, you have to get in touch with <strong>certain error message</strong> that will tell you what is wrong. </p> <p>to achieve that, always run your queries this way:</p> <pre><code>$sql = "SELECT * FROM persons"; $res = mysql_query($sql) or trigger_error(mysql_error().$sql); </code></pre>