pdo bind variables to prepared mysql statement and fetch using while loop to display in table
问题 I I am getting myself tangled with a pdo statement to display MySQL data in a table using pdo. my syntax is: $startdate=$_POST["start"]; $enddate=$_POST["end"]; $ttype=$_POST["ttype"]; $result = $db->query("SELECT cycletype,commenttype,adminstatus FROM v2loads where haulier= :haulier and :start < sarrive and :end> sarrive order by sarrive"); $result->bindParam(':haulier', $company, PDO::PARAM_STR); $result->bindParam(':start', $startdate, PDO::PARAM_STR); $result->bindParam(':end', $enddate,