create table book(bookid int ,title varchar(50),author varchar(50),book longblob);
insert into book values(1,'c#','arun','c:/c#.pdf');

BUT this code is not working properly

Prehaps because an illegal character? Where is all of your PHP code?

i want how to store and retrieve the images in mysql through php.i saw lot of codings but i cant able to understand it.if i type the same coding also answer is not coming. please help to solve this problem. thank you

In order to store images you have two options

1. Store the image directly in the database using a blob datatype.

For this there is a nice tutorial at http://www.phpriot.com/articles/images-in-mysql.

2. Store the image as a file in a folder and then store the link to the file in the database. This should be pretty easy to code directly.

Attach the code that you have currently written and I'll see what I can do to help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.