note 68206 modified in function.ociparse by sixd

From: Date: Mon, 05 Oct 2009 01:47:48 +0000
Subject: note 68206 modified in function.ociparse by sixd
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-161315@lists.php.net to get a copy of this message
connecting to oracle database, get the data and insert it into a dynamic drop down box <?php $conn = oci_connect("$username", "$password", 'ora10g'); if (!$conn) { $e = oci_error(); print htmlentities($e['message']); exit; } ?> <SELECT name="name"> <?php $query2 = "SELECT EMP_NAME, EMP_CODE FROM HR_EMP where APP_USER='$suserid' "; $statement2 = oci_parse ($conn, $query2); oci_execute ($statement2); while ($row = oci_fetch_array ($statement2, OCI_NUM)) { ?> <option value="<? echo $row[1]; ?>"> <? echo $row[0] ?> </option> <? } ?> </select> --was-- connecting to oracle database, get the data and insert it into a dynamic drop down box <?php $conn = oci_connect("$username", "$password", 'ora10g'); if (!$conn) { $e = oci_error(); print htmlentities($e['message']); exit; } ?> <SELECT name="name"> <?php $query2 = "SELECT EMP_NAME, EMP_CODE FROM HR_EMP where APP_USER='$suserid' "; $statement2 = oci_parse ($conn, $query2); oci_execute ($statement2); while ($row = oci_fetch_array ($statement2, OCI_NUM)) { ?> <option value="<? echo $row[1]; ?>"> <? echo $row[0] ?> </option> <? } ?> </select> http://php.net/manual/en/function.ociparse.php

« previous php.notes (#161315) next »