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? Quote 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']; Quote Link to comment https://forums.phpfreaks.com/topic/197229-max-result/#findComment-1035243 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.