+ 1
How do i store image and mp3 files to database.
9 Answers
+ 10
You could also use the common "BLOB" data type to store images, but MySQL is not the best option to do that... you would prefer alternatives like MongoDB or (even better, as stated by @Tashi) just store the absolute/relative path to the file. :)
+ 9
Hmm. Usually you would store the path to your file in your database, not the files themselves.
+ 7
The syntax of what? I don't even know which programming language and db we're talking about :)
+ 2
I like to store files outside of my databases and store the path to the files in the database instead. If db storage space isn't a concern then I guess BLOB storage is acceptable, but if you want to make the most of your db storage (especially if building a website with a shared hosting plan with db size limits) then store your files outside of your database and save the path only.
+ 2
oooooo advance Java. Surely if wielding such "advanced" technology you would know how to use it!
Seriously though... all you're doing in this situation is storing a string (the path to your file) as a record in your db. Not the file itself. If you know how to connect to a database and insert a record, then you know how to save the path to your file.
If you don't know how to connect to a database and insert a record, I'd start there first. There are thousands of examples online. Pick one and go.
+ 1
Thanks.
0
Hmm. Usually you would store the path to your file in your database, not the files themselves.
Could u send the syntax.
0
The syntax of what? I don't even know which programming language and db we're talking about :)
I am using advance java with html and the db is oracle
0
I just have an another problem.
How to use transitions in display attribute.
Suppose i want to make a menu after clicking on it
the content of menu will visible with transition.