Jump to content

[SOLVED] copying result from sqlserver to an array


aurheim

Recommended Posts

I have a object that will recive an array and make an optionbox out of it. Problem: It seams that im only able to copy the last result over to the array $enheter.Anyone able to point me to the right direction?

       

        $enhetquery = "SELECT EnhetsId,EnhetsNavn FROM tEnhet";

        $db=new base();

$con=$db->connect();

$valg=$db->kompetansebase($con);//chooses DB

$res=$db->ask($con,$enhetquery);

$enheter="";

for ($i=0;$i<mssql_num_rows($res);++$i){

$enheter= mssql_fetch_row($res);

 

}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.