xuan li writes:
> Hello all, When I use mysql_create to create the struce to access table,
> I have a question about the BOLB type.
> My table defined as follow:
>
> drop table ClipBoard; #4-13
> create table ClipBoard( # added 4-12 xuan li
> id INTEGER NOT NULL,
> data blob,
> primary key(id)
> );
>
> Then I use
> mysql_create_2{ ClipBoard,
> 1,2,
> int,id,
> string, data
> };
>
> If I use this clipBoard class to access table. Sometimes there is a
> error. I think string (the data type i am using) is not ok for blob. So
> what is the right datatype for blob.
>
> I know string is ok for text.
>
> Thanks
>
> Xuan Li
>
Hi!
As you can see from this excerpt from type_info.cc, string is the
right type :
sql_type_info("LONGBLOB NOT NULL", typeid(string), 17),
Do not forget to use row_data() to access binary data from the
columns.
Regards,
Sinisa
____ __ _____ _____ ___ == MySQL AB
/*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic
/*/ /*/ /*/ \*\_ |*| |*||*| mailto:[EMAIL PROTECTED]
/*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaca, Cyprus
/*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____
^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^
/*/ \*\ Developers Team
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php