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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thx,
j