I'm going crazy looking for the error in the following PDO SELECT statement:
$get_allocation_id = "SELECT" SELECT id FROM form1_group_info WHERE group_name=:group_name, group_leaders=:group_leaders, soas_short_cd=:soas_short_cd, phone_number=:phone_number, email=:email LIMIT 1"; $alloc_id_stmt = $dbh->prepare($get_allocation_id); $alloc_id_stmt->bindParam(":group_name", $params['group_name']); $alloc_id_stmt->bindParam(":date_submitted", $params['date_submitted']); $alloc_id_stmt->bindParam(":group_leaders", $params['group_leaders']); $alloc_id_stmt->bindParam(":soas_short_cd", $params['soas_short_cd']); $alloc_id_stmt->bindParam(":phone_number", $params['phone_number']); $alloc_id_stmt->bindParam(":email", $params['email']); $alloc_id_stmt->execute(); The above code is in a PHP file that is called by an ajax request which supplies $params.
Any suggestions are much appreciated.