On Dec 5, 10:19 am, sanderken <[EMAIL PROTECTED]> wrote:
> I read throught the oracle php cookbook and probably searched on the
> wrong searchterms ;) Thanks for the response. I encountered such an
> example of binding 
> here:http://www.oracle.com/technology/pub/articles/oracle_php_cookbook/fue...
>
> eg:
> <?php
> // etc.
>
> $sql = "INSERT INTO
>           mylobs
>           (
>             id,
>             mylob
>           )
>         VALUES
>           (
>             mylobs_id_seq.NEXTVAL,
>             :string
>           )
> ";
>
> $stmt = oci_parse($conn, $sql);
>
> $string = 'INSERT: '.date('H:i:s',time());
>
> oci_bind_by_name($stmt, ':string', $string);
>
> oci_execute($stmt)
>     or die ("Unable to execute query\n");
>
> // etc.
> ?>
>
> I was trying this last night but there seems to go something wrong
> when i execute sql in my model...

This might be stating the obvious but:

If you can get the raw sql to work so you know what you are trying to
achieve, it should then be possible to use a behavior (or override the
model beforeSave method directly if you want) to capture a save that
will exceed 4000 characters and automatically switch the sql statement
to an appropriate bind. That is, unless the logic is put directly in
the db driver and you submit a patch so that others can benefit from
(or at least find) your solution.

hth,

AD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to