phpbar.de logo

Mailinglisten-Archive

AW: [php] Oracle DB Verbindung

AW: [php] Oracle DB Verbindung

Benkert Dirk php_(at)_phpcenter.de
Tue, 17 Jul 2001 09:35:05 +0200


Hi...=20

hier ein Beispiel.

<?
$dbhandle =3D _(at)_OCILogon("USER","PASS","TNSNAME");
if(_(at)_OCIError() !=3D false){
	$dbhandle =3D _(at)_OCILogon("USER","PASS","TNSNAME");
}
$SQL =3D "SELECT id, title, releasedate FROM BLA";
$st =3D _(at)_OCIParse($dbhandle,$SQL);
if($st){
	$result =3D _(at)_OCIExecute($st);
	while(_(at)_OCIFetch($st)){

		$id =3D _(at)_OCIResult($st,1);
		$title =3D _(at)_OCIResult($st,2);
		$releasedate =3D _(at)_OCIResult($st,3);

		echo "<a href=3D\"#?$id=3D$id\">$title - $releasedate</a><br>";
	}
}

_(at)_OCIFreeStatement($st);
_(at)_OCILogOff($dbhandle);
?>

Noch Fragen???
Gr=FCsse
Dirk Benkert


php::bar PHP Wiki   -   Listenarchive