[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgwapi/inc/adodb/tests/tmssql.php, 1.1.2.1
From: |
nomail |
Subject: |
[Phpgroupware-cvs] phpgwapi/inc/adodb/tests/tmssql.php, 1.1.2.1 |
Date: |
Thu, 30 Dec 2004 05:51:48 +0100 |
Update of /phpgwapi/inc/adodb/tests
Added Files:
Branch: proposed-0_9_18-branch
tmssql.php
date: 2004/12/30 04:51:48; author: skwashd; state: Exp; lines: +65 -0
Log Message:
switch to ADOdb
=====================================================================
<?php
error_reporting(E_ALL);
ini_set('mssql.datetimeconvert',0);
function tmssql()
{
print "<h3>mssql</h3>";
$db = mssql_connect('JAGUAR\vsdotnet','adodb','natsoft') or die('No
Connection');
mssql_select_db('northwind',$db);
$rs = mssql_query('select getdate() as date',$db);
$o = mssql_fetch_row($rs);
print_r($o);
mssql_free_result($rs);
print "<p>Delete</p>"; flush();
$rs2 = mssql_query('delete from adoxyz',$db);
$p = mssql_num_rows($rs2);
mssql_free_result($rs2);
}
function tpear()
{
include_once('DB.php');
print "<h3>PEAR</h3>";
$username = 'adodb';
$password = 'natsoft';
$hostname = 'JAGUAR\vsdotnet';
$databasename = 'northwind';
$dsn = "mssql://$username:address@hidden/$databasename";
$conn = &DB::connect($dsn);
print "date=".$conn->GetOne('select getdate()')."<br>";
@$conn->query('create table tester (id integer)');
print "<p>Delete</p>"; flush();
$rs = $conn->query('delete from tester');
print "date=".$conn->GetOne('select getdate()')."<br>";
}
function tadodb()
{
include_once('../adodb.inc.php');
print "<h3>ADOdb</h3>";
$conn = NewADOConnection('mssql');
$conn->Connect('JAGUAR\vsdotnet','adodb','natsoft','northwind');
// $conn->debug=1;
print "date=".$conn->GetOne('select getdate()')."<br>";
$conn->Execute('create table tester (id integer)');
print "<p>Delete</p>"; flush();
$rs = $conn->Execute('delete from tester');
print "date=".$conn->GetOne('select getdate()')."<br>";
}
?>
<a href=tmssql.php?do=tmssql>mssql</a>
<a href=tmssql.php?do=tpear>pear</a>
<a href=tmssql.php?do=tadodb>adodb</a>
<?php
if (!empty($_GET['do'])) {
$do = $_GET['do'];
$do();
}
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] phpgwapi/inc/adodb/tests/tmssql.php, 1.1.2.1,
nomail <=