Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: INSERT ... VALUES( :placeholder1, ...)
Dont tell me anything - I know, I know... I should take a rest for a while
:)
"Opi" <opi_at_volny.cz> píše v diskusním příspěvku news:...
| 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 Mon Jan 14 2002 - 17:12:38 CST