我想在 $row 中显示第二条记录。
这是我的查询
select LEFT(A.F_ANOTRIMESTRE, 4) Year,
RIGHT(A.F_ANOTRIMESTRE, 2) Quarter,
IF(RIGHT(A.F_ANOTRIMESTRE, 2)=03,'Enero a Marzo',
IF(RIGHT(A.F_ANOTRIMESTRE, 2)=06,'Abril a Junio',
IF(RIGHT(A.F_ANOTRIMESTRE, 2)=09,'Julio a Septiembre',
IF(RIGHT(A.F_ANOTRIMESTRE, 2)=12,'Octubre a Diciembre',
'')
))) Quarter_Name,
ROUND(A.POR_RENTABILIDAD, 2) Quarterly_yield
from dr_rent_carteras_trimestres A
where A.ID_CARTERA = $ID_CARTERA
And A.IND_RENTABILIDAD = 1
Order by A.F_ANOTRIMESTRE asc
这里是php。
while($row = mysql_fetch_array($result))
{
$currentState = ($currentState == 'odd' ? 'even' :'odd' );
echo "<tr id='centered' >"; echo "<td class='leftalign'>" . $row['Quarter_Name'] . "</td>";
echo "<td>" . $row['Quarterly_yield'] . "</td>";
echo "</tr>";
}
echo "</tbody></table>";
我想在 Quarterly_yield 中提取第二条记录。我将如何显示它?