Hey guys, it's been a while since I've been here, and a lot has changed, php has moved from 5 to 7 and with it, has given me new challenges and I am stuck on one such challenge.
I'm trying to run a query my MySql table, with the following code to get 7 random records:
$conx = mysqli_connect('localhost', 'xxxxxxx', 'xxxxxxxx', 'xxxxxxxxx');
$sql = "SELECT * FROM `messages` ORDER by rand() LIMIT 7;";
$result = mysqli_query($conx, $sql);
$c = mysqli_num_rows($result);
while($row = mysqli_fetch_array($result)){....and so on.
And, so far so good. Now, how am I to go about if I am to identify what the first record in this query is?
I've tried and looked for answers, but couldn't get any results.
I was wondering if the learned and experienced in here would assist or guide me on this new learning path.
Cheers.