Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> INSERT ... VALUES( :placeholder1, ...)
Hi, I have written a recursive script in PHP that scans directory tree and
saves it to a single table. That was for mysql, and now when I'm tampering
with Oracle, I want to see it in action, so I have parsed this statement:
$sql =
"DECLARE dohajzlu NUMBER(5);"
."BEGIN SELECT godir_i.NEXTVAL INTO :dohajzlu FROM DUAL;"
."INSERT INTO godir VALUES(:dohajzlu, :pod, :xpath);".
"END;";
// then...
$b_curid = 0;
OCIBindByName($stmt,":dohajzlu",&$b_curid,32); OCIBindByName($stmt,":pod",&$b_pod,32); OCIBindByName($stmt,":xpath",&$b_xpath,32);
It works fine - until the $xpath contains something bad. It works with
"C:/mp3/Republica", "C:/mp3/Mike Oldfield", ... , but doesn't with
"C:/mp3/Mike Oldfield/1974 - Hergest Ridge", and it prints out this error:
"ORA-01460: no-sence or non-implemented conversion demanded" (Translated
from Czech, don't know the exact phrase.)
Please tell me what's wrong, and also please, tell me how to escape various chars, like \, &, ' etc.
Thanks, Opi Received on Sun Jan 13 2002 - 12:03:29 CST
![]() |
![]() |