SELECT * from User LIMIT 1
UNION
SELECT * from User LIMIT 74,1
Edit
@Kay: PHP can't change the internal order of the resultset after it's created.
If the query always returns 75 rows then the only way to access the 1st and the 75th before anything else would be to use mysql_data_seek which moves the internal result pointer:
$result = mysql_query('SELECT * from User');
mysql_data_seek($result, 1);
$row1 = mysql_fetch_assoc($result);
mysql_data_seek($result, 75);
$row75 = mysql_fetch_assoc($result);
Note that if the above is followed by a while
, the pointer must be reset to a suitable position.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…