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 1to the end of your SQL