I am currently getting the error:
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\Project\core\functions\image.php on line 23
I have tried the mysql_error and it returned:
Query is Empty
I have looked at the query and there seems to be nothing wrong with it, I don't understand what I have done wrong.
Here is the code:
function get_images($album_id) {
    $album_id = (int)$album_id;
    $images = array();
    $image_query = mysql_query("SELECT `image_id`, `timestamp`, `ext` FROM `images` WHERE `album_id`=$album_id AND `customers_custnum`=".$_SESSION["customers_custnum"]);
    while ($images_row = mysql_fetch_assoc($image_query)) {
        $images[] = array(
            'id' => $images_row["image_id"],
            'album' => $images_row["album_id"],
            'timestamp' => $images_row["timestamp"],
            'ext' => $images_row["ext"]
        );
    }
    return $images;
}
Any help would be greatly appreciated! Thank you for looking.
 
     
     
     
     
    