I'm trying to write a unified database query function for an application I have which currently accesses data from both DB2 and Microsoft SQL from a Linux server. I'm using ODBC functions for DB2, and Sybase functions for Microsoft SQL.
Here's what I've got for DB2, and a blank area for MSSQL: function db_query ($db_type, $db_conn, $db_query) { // Uncomment to debug //echo $db_query.'<br>'; if ($db_type == 'odbc') { $result = odbc_exec($db_conn, $db_query); while(odbc_fetch_into($result, &$row)) { $data[0][]=$row; } $data[0] = get_data ($result); $data[1] = odbc_num_rows ($result); odbc_free_result ($result); } else if ($db_type == 'sybase') { // What do I put here? } return $data; } If anyone could tell me what I could put in the sybase if statement to return data in an identical format as that returned by the odbc if statement, I would greatly appreciate it! I'm somewhat at a loss as the sybase commands are quite different from the odbc commands. Thanks in advance, -- Casey Allen Shobe / Network Security Analyst & PHP Developer SecureWorks, Inc. / 404.327.6339 x169 / Fax: 404.728.0144 [EMAIL PROTECTED] / http://www.secureworks.net Content is my own and does not necessarily represent my company. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php