How do I fix the “Mysql_fetch_array supplied argument is not a valid MYSQL result” error?
This is the code that had the error:
<?php
require "connect.php";
$query = mysql_query("SELECT author, date
FROM articles
WHERE id = ' . $id . '") or die(mysql_error());
$runrows = mysql_fetch_array('$query');
$author = $runrows['author'];
$date = $runrows['date'];
?>
There should be no quotes for
$query. Its a variable, not a string.