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'];
?>
WHERE id = " .((int)$id)and also see my presentation slideshare.net/billkarwin/sql-injection-myths-and-fallacies