Re: Unified DB Query function

From: Date: Mon, 01 Jul 2002 10:53:29 +0000
Subject: Re: Unified DB Query function
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-20234@lists.php.net to get a copy of this message
-- "Casey Allen Shobe" <cshobe@secureworks.net> ha scritto nel messaggio news:200207010600.39067.cshobe@secureworks.net... Whoops, had an extra line in there. Should have been as follows: 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[1] = odbc_num_rows ($result); odbc_free_result ($result); } else if ($db_type == 'sybase') { // What do I put here? } return $data; } Thanks, -- Casey Allen Shobe / Network Security Analyst & PHP Developer SecureWorks, Inc. / 404.327.6339 x169 / Fax: 404.728.0144 cshobe@secureworks.net / http://www.secureworks.net Content is my own and does not necessarily represent my company.

« previous php.db (#20234) next »