Link to home
Start Free TrialLog in
Avatar of jufabw00
jufabw00

asked on

Switching fromMySQL to ODBC

Hi,

I wrote an Application using WAMP. For some reason I have to use ODBC now.

I defined a class with the following method:

function select ($sql="")
{
     $count = 0;
     $data = array();
     while ( $row = mysql_fetch_array($results))
     {
          $data[$count] = $row;
          $count++;
     }
     return $data;
}

Since the lack of a function like "odbc_fetch_array()" I need a different way to return an associative array with "return $data", because the above method is the basis for a lot of other application-specific methods.

Any suggestions?

THX,
j
ASKER CERTIFIED SOLUTION
Avatar of axis_img
axis_img

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jufabw00
jufabw00

ASKER

... works with 4.2.1 (doesn't with 4.0.6. - yet ;-)))

thx,
j