Howdy.
As you see from my code I spend 5 lines of code to get the value of a query that always returnes a single value.
// Get the last SKU
$query = "SELECT MAX(productcode) FROM $products_table";
$lastskusql = $this->database->query($query);
$lastsku = $lastskusql->fetch_row();
$sku = $lastsku[0];
// Set current sku
$sku++;
Surely there must be a more direct way of doing this with mysqli?
(i.e. Query->result->$sku instead of Query->result->array->$sku)
I know it's not a huge thing, but every little helps
Thanks!
HK