On 10 Sep 2009, at 8:34pm, yogibabu wrote:
> UPDATE table1 SET stringblob = X'hex(string)' etc...
>
> it returns: unrecognized token x'hex', but when I put a variable by
> hand it
> works ok
Check to see that one of the levels of API you're using is not trying
to interpret the quotes
i have my data already in database, i want to perform some algorithms on it
and put it within the database onto the same row, because this is binary
data i must use blob
functions for processing the data are registered by
$pdo->sqliteCreateFunction
interestingly, when I operate on strings by
Sorry, but I still don't quite understand what do you have and what
are you trying to achieve.
Now I understand it like you have some binary data in php and want to
insert it into blob field. Then you should be able to do this:
UPDATE table1 SET stringblob = ? ...
And bind you binary data as
Pavel Ivanov-2 wrote:
>
> So why can't you do like this:
>
> sql = "UPDATE table1 SET stringblob = X'" . bin2hex(...) . "' ...";
>
because I want this function to be called within database without looping it
out through every row in php
--
View this message in context:
So why can't you do like this:
sql = "UPDATE table1 SET stringblob = X'" . bin2hex(...) . "' ...";
Pavel
On Thu, Sep 10, 2009 at 4:01 PM, yogibabu wrote:
>
>
>
> Pavel Ivanov-2 wrote:
>>
>> I don't really understand what you're trying to achieve, but what about
>>
>>
I don't really understand what you're trying to achieve, but what about
UPDATE table1 SET stringblob = cast(hex(string) as blob)
Pavel
On Thu, Sep 10, 2009 at 3:34 PM, yogibabu wrote:
>
> table has two three columns:
>
> i want to be able to put a result of internal
table has two three columns:
i want to be able to put a result of internal sqlite3 function to a blob
UPDATE table1 SET stringblob = hex(string) etc...
but as a result of this query the "stringblob" column is populated by
text's, not by blobs
something like this should work but it
7 matches
Mail list logo