Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
added 75 characters in body
Source Link
Michael Berkowski
  • 271.3k
  • 47
  • 450
  • 395

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.

I'm going crazy looking for the error in the following PDO SELECT statement:

$get_allocation_id = "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.

I'm going crazy looking for the error in the following PDO SELECT statement:

$get_allocation_id = "  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.

Source Link
Jon Rubins
  • 4.4k
  • 9
  • 36
  • 52

PDO throwing error

I'm going crazy looking for the error in the following PDO SELECT statement:

$get_allocation_id = "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.