Hi,
Going kind of nuts figuring this out.
<?php
if (isset($_GET['currentSelectedIndication']))
{
$selection = $_GET['currentSelectedIndication'];
$SQLString = "SELECT variant FROM indications WHERE indication='$selection'";
$queryResult = Process::queryDatabase($myConnection,$SQLString);
Process::generateVariants($queryResult);
}
?>
if i change $SQLString to: "SELECT variant FROM indications WHERE indication='Low Back Pain'"; it works.
When I run both $SQLString statements in the console or phpmyAdmin I get the correct results.
But why not in my script? $selection is 'Low Back Pain'. I echoed it to verify that it is indeed correct.
I am single quoting the PHP variable correctly, I think. Oddly, the syntax is the same with another function that uses the same syntax.
Any ideas why?