1 Reply Latest reply on Apr 26, 2013 11:56 PM by cj

    In order to pass pl/sql statements using Oracle Semantic functions in PHP


      I am developing android application connected to Oracle database using PHP,

      and I use PL/SQL statements with semantic technologies provided in Oracle(specifically, SEM_MATCH, SEM_MODELS, SEM_RULEBASES or something like this).

      However, it doesn't work properly...the connection between android and Oracle works well, though. Also, the query statement is implemented well in the sql developer.

      The whole php code is shown below :


      function db_connect()
      *$db = "(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = = 1521)))(CONNECT_DATA=(SID=orcl)))";*

      *if ($conn=oci_connect("rdfusr", "rdfusr", $db)){*
      echo "Successfully connected to Oracle.<br />\n";

      return $conn;
      *} else {*
      *$err = OCIError();*
      *echo "Oracle Connect Error " . $err[text];*

      *$conn = db_connect();*

      *$stid = oci_parse($conn, "SELECT nm.NAME, nm.FLOOR, nm.ROOM_NUM, nm.PHONENUM, nm.FID FROM*
      *(SELECT z FROM TABLE(SEM_MATCH('{?y :soldIn ?z}',*

      *WHERE y = 'http://www.example.org/activity/Carbonara') ont,BUSINESSINFO nm*
      *WHERE ont.z = nm.NAME;");*

      *while (($row = oci_fetch_array($stid, OCI_BOTH))) {*




      Please, give me any kinds of methods working well...thanks in advance