LordGarfield
IS-IT--Management
hi,
I have a database with a few fields
menuid int(11) autonumber
name varchar(100)
sorteer int(11)
link varchar(255)
now the strange thing is
I select the sorteer integer out of the database into a var
and I wanne add 1 to it.
<connection>
$sql1 = "select * from menu order by sorteer";
$rec = mysql_query($sql1);
while(list($id, $name, $sorteer, $link) = mysql_fetch_row($rec))
{
echo $id . "<br>";
echo $sorteer . "<br>";
}
$id = $id +1;
echo $id . "<br>";
$sorteer = $sorteer + 1;
echo $sorteer . "<br>";
there is only one item in the db but the result is like this
1
1
1
1
so he did not add 1 to the $id var and also not to the $sorteer.
How come???
mvg
Roel.
I have a database with a few fields
menuid int(11) autonumber
name varchar(100)
sorteer int(11)
link varchar(255)
now the strange thing is
I select the sorteer integer out of the database into a var
and I wanne add 1 to it.
<connection>
$sql1 = "select * from menu order by sorteer";
$rec = mysql_query($sql1);
while(list($id, $name, $sorteer, $link) = mysql_fetch_row($rec))
{
echo $id . "<br>";
echo $sorteer . "<br>";
}
$id = $id +1;
echo $id . "<br>";
$sorteer = $sorteer + 1;
echo $sorteer . "<br>";
there is only one item in the db but the result is like this
1
1
1
1
so he did not add 1 to the $id var and also not to the $sorteer.
How come???
mvg
Roel.