User Tools

Site Tools


kurs:test-db.php

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

kurs:test-db.php [2014/09/10 21:22]
kurs:test-db.php [2014/09/10 21:22] (current)
Line 1: Line 1:
 +<​code>​
 +<?php
  
 +$db = oci_connect('​hr',​ '​hr',​ '​orcl11'​);​
 +
 +$q = oci_parse($db,​ "​select to_char(sysdate,​ '​yyyy-mm-dd hh24:​mi:​ss'​) from dual"​);​
 +
 +$r = oci_execute($q,​ OCI_DEFAULT);​
 +
 +$row = oci_fetch_array($q,​ OCI_RETURN_NULLS);​
 +
 +echo $row[0] . "​\n";​
 +
 +?>
 +</​code>​
kurs/test-db.php.txt ยท Last modified: 2014/09/10 21:22 (external edit)