PHP: getting data from Oracle 10g database -
I am working with PHP using wamp server 2.0 and my database is Oracle 10g.
I am new to Php and I am trying to get data from database.
There are two columns in my table. I want to show 1 column data. After executing I get the blank page without data from the database (and yes, there is data in my database).
How can I fix this?
& lt;? Php $ c = oci_connect ("system", "123", "localhost / xi"); If (! $ C) {echo "Unable to connect:" Var_dump (oci_error ()); Die (); } $ S = oci_parse ($ c, "select from tab1 to col2"); Oci_execute ($ s, OCI_DEFAULT); While ($ line = oci_fetch ($ s)) {echo $ line ['name']. "& Lt; br & gt;"; } // Commit to saving changes ... oci_commit ($ c); // logoff from Oracle ... oci_free_statement ($ s); Oci_close ($ c); ? & Gt;
The result copies in an internal buffer that you have to access for example Using
BTW: If you have set a high value and have started, you may have noticed that you used to behave as an array while printing the boolean to $ row ['name']. Had tried to. .
Comments
Post a Comment