I have this code, that just make a select from a table WHERE the field "id_banner" is > than $id, a variable that i've passed:
//begin here
$teste = "select id_banner from banners where id_banner > '$id'";
$run_teste = mysql_query ($teste, $conn);
$array = mysql_fetch_array ($run_teste);
while ($array = mysql_fetch_array ($run_teste))
{
echo $array ["id_banner"];
}
/Ends here...
//obs.: the actual values on the field
//id_banner are:
1
2
3
4
5
6
//well, that's it.
The problem is: I'm ALWAYS loosing the FIRST value of the array!!!! for example, when $id = '1', the result is "3456" and so on... where is the number '2'?
Why does it "hides" the value of the first position of the array?
Anyone?
Thanx,
Ricardo Leite
//begin here
$teste = "select id_banner from banners where id_banner > '$id'";
$run_teste = mysql_query ($teste, $conn);
$array = mysql_fetch_array ($run_teste);
while ($array = mysql_fetch_array ($run_teste))
{
echo $array ["id_banner"];
}
/Ends here...
//obs.: the actual values on the field
//id_banner are:
1
2
3
4
5
6
//well, that's it.
The problem is: I'm ALWAYS loosing the FIRST value of the array!!!! for example, when $id = '1', the result is "3456" and so on... where is the number '2'?
Why does it "hides" the value of the first position of the array?
Anyone?
Thanx,
Ricardo Leite