Just trying to store blob data (int array[128]) in a sql db.
I am having issue with my sql statement
// temp is a 512 byte char array that was memcpyed from a 512 byte int array
sprintf(insert, "insert into SiftFeatures(M_Id, FeatureData) values((Select M_Id from Master where M_Id='1'), 'Ab345' )" , temp);
if(mysql_query(con, insert)){
fprintf(stderr, "%s\n", mysql_error(con));
}
The problem here is that when I do this the char * terminates on a null byte (i.e 0000 0000) I don't really know how to do this sql execution statement. Is there another way?