I'm trying to use the limit clause but the query is not correct
look:
$inizio = $HTTP_POST_VARS[pagina] - 1;
if ($inizio = "" ) $inizio = 0;
$link = mysql_connect("localhost", "xxxxx", "yyyyy");
if (!$link)
die ("Impossibile aprire mysql");
mysql_select_db("dipendenti", $link) or die("Impossibile aprire dipendenti");
$query = "Select * From dipendenti LIMIT $inizio, 5";
echo '<table border="1"><tr><td><b>Nome</b></td><td><b>Cognome</b></td><td><b>Stipendio</b></td><td>ID</td><td>Cancella</td></tr>';
$result = mysql_query($query, $link);
while($a_row = mysql_fetch_object($result))
.... and so on....
but when i use "while ($a_row ecc. ecc. " php says "Warning: Supplied argument is not a valid MySQL result resource in /home/pelo84/webserver/index.php"
If i erase limit from the query, it works...
What's the problem?