dvd420 Posted January 9, 2009 Share Posted January 9, 2009 Hi, I want to describe a table. oci_execute() is not taking "DESC[RIBE]" as a valid query. So, I am using the following code for it: But I am unable to detremine if a field is NULL or NOT NULL. oci_field_is_null() is returning FALSE always. function desc_table($conn, $tab) { $stid = oci_parse($conn, "SELECT * FROM $tab"); $r = oci_execute($stid, OCI_DEFAULT); if (!$r) { $e = oci_error($stid); print $e['message']; } else { $ncols = oci_num_fields($stid); for ($i = 1; $i <= $ncols; $i++) { $column_name = oci_field_name($stid, $i); $column_type = oci_field_type($stid, $i); $column_size = oci_field_size($stid, $i); $column_nvl = oci_field_is_null($stid, $i); // Print .... } } } Quote Link to comment Share on other sites More sharing options...
dvd420 Posted January 9, 2009 Author Share Posted January 9, 2009 I think oci_field_is_null() is used for a perticular value. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.