This shows you the differences between two versions of the page.
— |
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> |