adodb 최신버전으로 변경
<? 를 <?php 로 변경
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
/**
|
||||
* Helper functions to convert between ADODB recordset objects and XMLRPC values.
|
||||
* Uses John Lim's AdoDB and Edd Dumbill's phpxmlrpc libs
|
||||
*
|
||||
*
|
||||
* @author Daniele Baroncelli
|
||||
* @author Gaetano Giunta
|
||||
* @copyright (c) 2003-2004 Giunta/Baroncelli. All rights reserved.
|
||||
*
|
||||
*
|
||||
* @todo some more error checking here and there
|
||||
* @todo document the xmlrpc-struct used to encode recordset info
|
||||
* @todo verify if using xmlrpc_encode($rs->GetArray()) would work with:
|
||||
@@ -16,10 +16,10 @@
|
||||
|
||||
/**
|
||||
* Include the main libraries
|
||||
*/
|
||||
*/
|
||||
require_once('xmlrpc.inc');
|
||||
if (!defined('ADODB_DIR')) require_once('adodb.inc.php');
|
||||
|
||||
|
||||
/**
|
||||
* Builds an xmlrpc struct value out of an AdoDB recordset
|
||||
*/
|
||||
@@ -113,12 +113,12 @@
|
||||
}
|
||||
$body = new xmlrpcval ($rows, "array");
|
||||
|
||||
return $body;
|
||||
return $body;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns an xmlrpc struct value as string out of an AdoDB recordset
|
||||
*/
|
||||
*/
|
||||
function rs2xmlrpcstring (&$adodbrs) {
|
||||
$xmlrpc = rs2xmlrpcval ($adodbrs);
|
||||
if ($xmlrpc)
|
||||
@@ -129,24 +129,24 @@
|
||||
|
||||
/**
|
||||
* Given a well-formed xmlrpc struct object returns an AdoDB object
|
||||
*
|
||||
*
|
||||
* @todo add some error checking on the input value
|
||||
*/
|
||||
function xmlrpcval2rs (&$xmlrpcval) {
|
||||
|
||||
$fields_array = array();
|
||||
$data_array = array();
|
||||
|
||||
// rebuild column information
|
||||
|
||||
// rebuild column information
|
||||
$header = $xmlrpcval->structmem('header');
|
||||
|
||||
|
||||
$numfields = $header->structmem('fieldcount');
|
||||
$numfields = $numfields->scalarval();
|
||||
$numrecords = $header->structmem('recordcount');
|
||||
$numrecords = $numrecords->scalarval();
|
||||
$sqlstring = $header->structmem('sql');
|
||||
$sqlstring = $sqlstring->scalarval();
|
||||
|
||||
|
||||
$fieldinfo = $header->structmem('fieldinfo');
|
||||
for ($i = 0; $i < $numfields; $i++) {
|
||||
$temp = $fieldinfo->arraymem($i);
|
||||
@@ -179,5 +179,3 @@
|
||||
return $rs;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user