|
Posted by Peter van Schie on 11/29/06 17:47
Hi kirke,
> $result= mssql_query($sql) or die();
>
> while ($row = mssql_fetch_array($result))
> {
> $veh = $veh+","+$row[0]; }
>
> But it doesn't work.....
> Help me...
> thx.
Just use mssql_fetch_assoc instead of mssql_fetch_array, to only
retrieve the associative array.
Then you can use $row['A'] for instance to show the value of the current
row's A value:
$result= mssql_query($sql) or die();
while ($row = mssql_fetch_assoc($result))
{
echo $row['A'] . '<br />';
}
Also note that you should check the input value of the formfield L,
instead of just using it in the sql query. You should use
mysql_real_escape_string to escape the value, like:
mysql_real_escape_string($_POST['L'])
Peter.
--
http://www.phpforums.nl
Navigation:
[Reply to this message]
|