I have a query to return only 10 records:
$result = mysql_query ("SELECT * FROM sm_Solves ORDER BY solved_stamp DESC LIMIT 10;") or die ("error in query. ".mysql_error());
In this table, the "solved_stamp" is a timestamp result and there is a field called "username". I want to take the result of my query, set the FIRST record's "username" and set it to a variable:
$Auto1 = RECORD1_Username
Then display the remaining records to a variable in a numbered list:
$Auto2_9 = 2. RECORD2_Username <br_/> 3. RECORD3_Username <br_/> 4. RECORD4_Username <br_/> 5. RECORD5_Username <br_/> 6. RECORD6_Username <br_/> 7. RECORD7_Username <br_/> 8. RECORD8_Username <br_/> 9. RECORD9_Username
I would like to a take into account that there may be LESS than 10 records found and possiblly NO RECORDS found (producing no code).
Appreciate any help anyone can offer ;-)