oci_fetch_array
2019. 5. 16. 16:02ㆍdeveloper
<?php
$conn = oci_connect('hr', 'welcome', 'localhost/XE');
if (!$conn) {
$e = oci_error();
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
$stid = oci_parse($conn, 'SELECT department_id, department_name FROM departments');
oci_execute($stid);
while (($row = oci_fetch_array($stid, OCI_BOTH)) != false) {
// Use the uppercase column names for the associative array indices
echo $row[0] . " and " . $row['DEPARTMENT_ID'] . " are the same<br>\n";
echo $row[1] . " and " . $row['DEPARTMENT_NAME'] . " are the same<br>\n";
}
oci_free_statement($stid);
oci_close($conn);
?>
'developer' 카테고리의 다른 글
| phpize로 공유 PECL 확장모듈 컴파일하기 (0) | 2019.05.16 |
|---|---|
| pecl 명령을 사용하여 공유 PECL 확장모듈을 컴파일 하기 (0) | 2019.05.16 |
| PECL 확장모듈 다운로드 (0) | 2019.05.16 |
| oci_connect (0) | 2019.05.16 |
| mysql_affected_rows (0) | 2019.05.16 |