older code and now mysqli
So for years, I did a page to a result page, ie , question = answer using a mysql id... all good.
But I had to relearn with mysqli better code. I am sharing in hopes it helps someone else...
Project in play:
page for results
So while I had the "idea" of how it worked previously, I didn't quite get it with using new mysqli,
I am sharing but also so I remember how to re-learn this one.
$rifles = new WA_MySQLi_RS("rifles",$classic2020,0);
$rifles->setQuery("SELECT * FROM guns WHERE cat_ID = 1 ORDER BY gun_ID DESC");
the result page
$fieldgunresult = new WA_MySQLi_RS("fieldgunresult",$classic2020,1);
$fieldgunresult->setQuery("SELECT * FROM guns WHERE gun_ID = ?");
$fieldgunresult->bindParam("i", "".(isset($_GET['gun_ID'])?$_GET['gun_ID']:"") ."", "-1"); //colname
I am still testing but I think I have figured it out. It is a lot different than from earlier efforts.