Results 1 to 4 of 4
Thread: how to set longblob to null
Dec 21, 2010, 12:31 #1
how to set longblob to null
I have images in my table as longblob type. I tried using the UPDATE statement to set the column to null, but for some reason it didnt update. It did show the query was successful.
I tried something along this line:
set icon = null
WHERE icon_location is not null
Dec 21, 2010, 12:43 #2
- Join Date
- Aug 2008
- The Netherlands
- 153 Post(s)
- 2 Thread(s)
Is NULL allowed for the field? i.e. you didn't define it with NOT NULL?
Can you show a SHOW CREATE TABLE for the concerned table?Rémon - Hosting Advisor
SitePoint forums will switch to Discourse soon! Make sure you're ready for it!
Minimal Bookmarks Tree
My Google Chrome extension: browsing bookmarks made easy
Dec 21, 2010, 12:50 #3
I have it set as default value of null. I thought I would be able to replace binary data with null value or some default value.
CREATE TABLE `icons` (
`id` int(11) NOT NULL auto_increment,
`icon_location` varchar(200) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=67436 DEFAULT CHARSET=latin1
Dec 22, 2010, 21:57 #4