Latest Tutorial

We can store images or other document into database (such as MySQL). For this job, we will work with BLOB field in table. Ok, let’s do it!
First, create a table that have BLOB file. I will create table named “books”:

CREATE TABLE `books2` (

`id` int(11) NOT NULL auto_increment,

`title` varchar(150) NOT NULL,

`author` varchar(150) NOT NULL,

`description` varchar(255) NOT NULL,

`on_sale` tinyint(1) NOT NULL,

`cover` blob NOT NULL,

PRIMARY KEY  (`id`)

);

0 comments:

Post a Comment

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

 
Top
Blogger Template