Hy,
I'm new in php and I'm having some problems with mysql_fetch_array()
.
$sql = "SELECT mandant_kurz FROM pu_mandant ORDER BY mandant_kurz ASC";
$result = mysql_query($sql);
$list = mysql_fetch_array($result);
There are more than 100 entries in the database but the mysql_fetch_array()
delivers only one. When I'm trying it with a while-loop it isn't working either.
Here it goes with my while-loop
$sql = "SELECT mandant_kurz FROM pu_mandant ORDER BY mandant_kurz ASC";
$result = mysql_query($sql);
while($list = mysql_fetch_array($result));
mysql_query()
call. Otherwise, your script will break if the query fails. How to do this is outlined in the manual onmysql_query()
or in this reference question. – Pekka 웃 Feb 28 '12 at 12:24while($list = mysql_fetch_array($result));
?? loop ended with a semicolon that means its close after all iteration without processing. – Nikson Kanti Paul Feb 28 '12 at 12:28while ($list = mysql_fetch_array($result))
to create it. – sebbl.sche Feb 28 '12 at 12:34