haha -- I laughed out loud when you said "who cares about a couple microseconds" because the difference in speed was literally 1/10,000 of a second!
By the way, is there a SIMPLE "one-liner" of code to look up one record? For example, to look up a person's name from an order number, I used to use:
$query = mysql_query("select customer from table where ordernumber = '122345'");
$answer = mysql_result($query,0,0);
print $answer; //Voila!
But now, with mysqli, it looks like I always have to "loop" through results (even if there's only one result) like this:
if ($result = mysqli_query($conn,"select customer from table where ordernumber = '122345'")) {
while ($row = mysqli_fetch_assoc($result)) {
print $row["customer"]); // loops seem a waste.... bring back old mySQL
}
mysqli_free_result($result);
}
Am I stuck with using loops with mysqli?
Thank you!!