I have the code below.I know that the query has 1 column as result but the code return false for the row.
What is wrong?
$query = "select ac_min_price,ac_final_date from auction_products
$idresults = $dbh->prepare(query);
$row = $idresults->fetch(PDO::FETCH_ASSOC);
I solve it.
$idresults = $dbh->prepare(query); is $idresults = $dbh->prepare($query);
Is your best friend.
Unless you have the misfortune of working with an ancient codebase that kicks out over 7000 notice and warning level errors each time it runs (I'm not joking).
Or a script that kicks out 8 errors into an error log, and is cron'd to run every 60 seconds of the day....(2 GB log per day...)
You too eh? Ancient code. Keeps us employed. One day PHP will pass away in favor of a better language, but I bet there will be a few of us left even then. Just like the COBOL guys today.