i keep getting this error, can you please check it out..
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
heres the code...
function get_id($sel_id) {
global $connection;
$query = "SELECT * ";
$query .= "FROM post ";
$query .= "WHERE id=" . $sel_id ." ";
$query .= "LIMIT 1";
$result = mysql_query($query);
if ($sub = mysql_fetch_array($result)) {
return $sub;
} else {
return NULL;
}
}