Problems with BLOB
Posted: Fri Aug 11, 2006 9:17 am
Have 2 tables from different Interbase databases whichform
The second table "TITLE" has the same structure.
What i'm trying to do is to select fields from table 154 and input them in table
"TITLE".
This is the code:
function "available" returns a string of the form "IN(1,2,3,4,5)"
I get the following warnings;
Warning: ibase_query() [function.ibase-query]: Dynamic SQL Error SQL error code = -104 Token unknown - line 1, char 29 x0000003200000091 in c:\HOST\localhost\interbase\convert2.php on line
if i try for example to output the blob i get:
12 Warning: ibase_blob_echo() [function.ibase-blob-echo]: invalid BLOB ID in
This meens that just is outputed.
I've tested the query for selection in interbase itself and it works.
Any suggestions?
Code: Select all
CREATE TABLE I54
(
N_INT INTEGER,
ROM BLOB SUB_TYPE TEXT SEGMENT SIZE 90 CHARACTER SET UNICODE_FSS,
ENG BLOB SUB_TYPE TEXT SEGMENT SIZE 90 CHARACTER SET UNICODE_FSS,
RUS BLOB SUB_TYPE TEXT SEGMENT SIZE 90 CHARACTER SET UNICODE_FSS
);What i'm trying to do is to select fields from table 154 and input them in table
"TITLE".
This is the code:
Code: Select all
$query4="SELECT N_INT, ROM, ENG, RUS FROM I54 WHERE N_INT ".available($n_ints)." ORDER BY N_INT ;" ;
$result_select2 = ibase_query($db, $query4);
while ($data = ibase_fetch_object($result_select2)) {
$query5="INSERT INTO TITLE VALUES(".$row->N_INT.",".$row->ROM.",".$row->ENG.",".$row->RUS.");";
$result_insert2 = ibase_query($db2, $query5);
}I get the following warnings;
Warning: ibase_query() [function.ibase-query]: Dynamic SQL Error SQL error code = -104 Token unknown - line 1, char 29 x0000003200000091 in c:\HOST\localhost\interbase\convert2.php on line
if i try for example to output the blob
Code: Select all
echo $row->N_INT; ibase_blob_echo($row->ROM);12 Warning: ibase_blob_echo() [function.ibase-blob-echo]: invalid BLOB ID in
This meens that just
Code: Select all
echo $row->N_INT;I've tested the query for selection in interbase itself and it works.
Any suggestions?