Ciao a tutti, sono riuscita in parte ad avere il risultato che volevo
.
Infatti modificando :
conCodice PHP:$query = " SELECT nome FROM $table1 ";
$result = mysql_query($query);
while($row = mysql_fetch_array($result))
mi vengono mostrati 10 record di 100 inseriti nel db, ma aggiungendo :Codice PHP:...
...
$rowsPerPage = 10;
$pageNum = 1;
if(isset($_GET['page']))
{
$pageNum = $_GET['page'];
}
$offset = ($pageNum - 1) * $rowsPerPage;
$query = " SELECT nome FROM $table1 " .
" LIMIT $offset, $rowsPerPage";
$result = mysql_query($query) or die('Error, query failed');
while($row = mysql_fetch_array($result))
{
$nome = $row["nome"];
echo "<td>$nome</td>";
...
...
}
invece di essere visibili i tasti paginazione mi esce il primo recordCodice PHP:if ($pageNum > 1)
{
$page = $pageNum - 1;
$prev = " <a href=\"$self?page=$page\">[Prev]</a> ";
$first = " <a href=\"$self?page=1\">[First Page]</a> ";
}
else
{
$prev = '';
$first = '';
}
if ($pageNum < $maxPage)
{
$page = $pageNum + 1;
$next = " <a href=\"$self?page=$page\">[Next]</a> ";
$last = " <a href=\"$self?page=$maxPage\">[Last Page]</a> ";
}
else
{
$next = '';
$last = '';
}
echo $first . $prev . $nav . $next . $last;
![]()
In cosa sbaglio?
Ci sono soluzioni alternative sempre utilizzando
ho gia cercato qualcosa di simile sul forum ma nullaCodice PHP:while($row = mysql_fetch_array($result))
![]()
Grazie in anticipo a chi mi aiutera' .
Saluti
Milena

, sono riuscita in parte ad avere il risultato che volevo
.
Rispondi quotando
.
: