How do I get the first result of this query using php? I want the first result that is returned when the list is in descending order.
$sql2 = "SELECT orderID FROM orders WHERE 'customerID' = '".$_SESSION['accountID']."' ORDER BY
'orderID' DESC";
$lastorder = mysqli_query($sql2);
Thanks!
Simply add LIMIT 1 to the end of your SQL
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With