correct use of bind variables

Discussion in 'PHP' started by steyr, Jul 16, 2007.

  1. #1
    Hy!

    I am learning php in connection with an oracle 10g XE and have a problem concerning bind variables. I tried using bind variables in the code posted below but it did not work. The problem is that the documentation I use is quite weak explaining the correct use of bind variables- so I would also be thankful for a literature hint!

    
    {
        // Parse a query
        $s = oci_parse($c,"SELECT vl_id
      FROM vehicle_location
    MINUS
    SELECT a.vl_id
      FROM vehicle_location a,
           defined_area b
    WHERE SDO_ANYINTERACT(b.da_shape,a.vl_location) = 'TRUE' AND (b.da_date) = :date
                         ");
                         
    oci_bind_by_name($s, ":date", $date);
    
        // Execute query without an implicit commit.
        oci_execute($s,OCI_DEFAULT);
    
    Code (markup):
    thanks for your help!!

    steyr
     
    steyr, Jul 16, 2007 IP
  2. steyr

    steyr Guest

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Could solve it by myself!!!
     
    steyr, Jul 17, 2007 IP