amp /include/adodb/tests/test2.php

Language PHP Lines 26
MD5 Hash 384bf94f1e4a9ab57dd0808030ba021c Estimated Cost $352 (why?)
Repository https://github.com/radicaldesigns/amp.git View Raw File View Project SPDX
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php

// BASIC ADO test

	include_once('../adodb.inc.php');

	$db = &ADONewConnection("ado_access");
	$db->debug=1;
	$access = 'd:\inetpub\wwwroot\php\NWIND.MDB';
	$myDSN =  'PROVIDER=Microsoft.Jet.OLEDB.4.0;'
		. 'DATA SOURCE=' . $access . ';';
		
	echo "<p>PHP ",PHP_VERSION,"</p>";
	
	$db->Connect($myDSN) || die('fail');
	
	print_r($db->ServerInfo());
	
	try {
	$rs = $db->Execute("select $db->sysTimeStamp,* from adoxyz where id>02xx");
	print_r($rs->fields);
	} catch(exception $e) {
	print_r($e);
	echo "<p> Date m/d/Y =",$db->UserDate($rs->fields[4],'m/d/Y');
	}
?>
Back to Top