I've a problem with get a single value from mysql and variable assignment.
var_dump($val) looks ok:
object(stdClass)#5 (1) { ["min(ID_plants)"]=> string(1) "1" }
And i need this "1" assign to variable.
$first= "SELECT min(ID_plants) from Plants";
if (mysqli_query($link,$first)){
$res = mysqli_query($link,$first);
$val = mysqli_fetch_object($res);
}
//var_dump($val);
//$first_index$=($val->MIN(ID_plants));