MySQL Forums
Forum List  »  PHP

database not saving image to blob
Posted by: Larry Seymour
Date: August 31, 2016 06:39PM

i am trying to save an image to my db. i am using php and i have checked all the data in the php file and it is all there including the image in bae64string.

the confusinmg part is if i do the insert from mysql it works.
the only column that does get saved is mealPic.
there are no errors as the code returns an id.

my table setup is
CREATE TABLE IF NOT EXISTS `meals` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`meal` varchar(11) NOT NULL,
`comment` varchar(1000) DEFAULT NULL,
`date` datetime NOT NULL,
`taste` int(11) NOT NULL,
`feeling` int(11) NOT NULL,
`mealPic` mediumblob NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=63 ;

am i missing anything.

Options: ReplyQuote


Subject
Written By
Posted
database not saving image to blob
August 31, 2016 06:39PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.