Hello,
I am using a function in PHP to prepare a mysql SELECT statement and it seems to be failing on one line of code. What am I doing wrong?
I am using a function in PHP to prepare a mysql SELECT statement and it seems to be failing on one line of code. What am I doing wrong?
Code:
function loadCounty(){
$sqlCounty = "SELECT id, county_name FROM wp_counties WHERE state_id=? ORDER BY county_name ASC";
$stmt = $_SESSION["link"]->prepare($sqlCounty);
$stmt->bind_param("i", $_SESSION[State]);
$stmt->execute();
$resultC = $stmt->get_result(); // This is the code causing my snippet to fail
return $resultC;
}