<?php function news() { $aSQL = \"select numer from ilosc where nazwa='NEWS'\"; { $liczba = $aRow[\"numer\"]; }; $x = $liczba; do { $aSQL = \"select * from news where numer= $x \"; { $tytul = $aRow[\"tytul\"]; $data_dodania = $aRow[\"data_dodania\"]; $tresc = $aRow[\"tresc\"]; $autor = $aRow[\"autor\"]; }; $x = $x - 1 ; <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='0'> <TR> <TD> <TD bgcolor='blue' align='left' valign='top' width='400'> <Font color='white'> $tytul </Font> </TD> <TD> <TD bgcolor='blue' align='right' valign='top' width='100'> <Font color='white'> $data_dodania </Font> </TD> </TR> <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='0'> <TR> <TD> <TD bgcolor='lightblue' align='left' valign='top' width='500'> $tresc </TD> </TR> <TABLE BORDER='0' CELLSPACING='0' CELLPADDING='0'> <TR> <TD> <TD bgcolor='blue' align='right' valign='top' width='500'> <FONT color='white'> $autor </FONT> </TD> </TR> <TR> <TD> <TD height='100'> </TD> </TR> </TABLE> \"); } while ($x < 1 ); } ?>
Mimo, że na koniec wykonania funkcjii zmienna $x wynosi 2 petla się kończy i wyświetla się tylko 1 NEWS . Jaki głupi błąd znowu zrobiłem ?
