i am having a problem with my code i dont understand whats really wrong with it. i want to get the user id against the LoginID from a table in database but its giving an error of
mysql_fetch_assoc() expects parameter 1 to be resource array given.....
calling to function...
$login_id= $_SESSION['a_id'];
$result=$add_task -> get_id_from_login_id($login_id);
while($id=mysql_fetch_assoc($result)) {
echo $id;
}
and in the function i have this code
$SQL="SELECT id FROM admin WHERE LoginID='$login_id'";
return $this->execute_sql($SQL);