c - How to directly insert images and other type of files into SQLITE database as like in mysql and sql by using query? -


how directly insert images , other type of files sqlite database in mysql , sql using query? if not so, there chance in c api programs(only) acquire it?

you should use blob type, allows store raw binary data. don't know maximum allowed size, though.
create table following:

create table `test`.`pic` (  `idpic` integer unsigned not null auto_increment,  `caption` varchar(45) not null,  `img` blob not null,  primary key(`idpic`)  ); 

then read image using standard i/o , write data img column, file.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -