From 6854cb3f4d8219cf1829e32122eb2502a916eae9 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 1 Feb 2020 09:05:48 +0100 Subject: initial checkin --- vendor/adodb/adodb-php/server.php | 100 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 vendor/adodb/adodb-php/server.php (limited to 'vendor/adodb/adodb-php/server.php') diff --git a/vendor/adodb/adodb-php/server.php b/vendor/adodb/adodb-php/server.php new file mode 100644 index 0000000..a989e16 --- /dev/null +++ b/vendor/adodb/adodb-php/server.php @@ -0,0 +1,100 @@ +Connect($host,$uid,$pwd,$database)) err($conn->ErrorNo(). $sep . $conn->ErrorMsg()); +$sql = undomq($_REQUEST['sql']); + +if (isset($_REQUEST['fetch'])) + $ADODB_FETCH_MODE = $_REQUEST['fetch']; + +if (isset($_REQUEST['nrows'])) { + $nrows = $_REQUEST['nrows']; + $offset = isset($_REQUEST['offset']) ? $_REQUEST['offset'] : -1; + $rs = $conn->SelectLimit($sql,$nrows,$offset); +} else + $rs = $conn->Execute($sql); +if ($rs){ + //$rs->timeToLive = 1; + echo _rs2serialize($rs,$conn,$sql); + $rs->Close(); +} else + err($conn->ErrorNo(). $sep .$conn->ErrorMsg()); -- cgit v1.2.3-70-g09d2