hackalive Posted April 1, 2010 Share Posted April 1, 2010 I have this code $qry_AL = "SELECT max(position) FROM `articles` WHERE `uri`='$uri'"; $result_AL= $mysqli->query($qry_AL, MYSQLI_STORE_RESULT); $AL = mysqli_fetch_array($result_AL); but it returns "Array" not the number any ideas? Link to comment https://forums.phpfreaks.com/topic/197229-max-result/ Share on other sites More sharing options...
JonnoTheDev Posted April 1, 2010 Share Posted April 1, 2010 $qry_AL = "SELECT max(position) AS x FROM `articles` WHERE `uri`='$uri'"; $result_AL= $mysqli->query($qry_AL, MYSQLI_STORE_RESULT); $AL = mysqli_fetch_array($result_AL); print $AL['x']; Link to comment https://forums.phpfreaks.com/topic/197229-max-result/#findComment-1035243 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.