You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ryan webb <we...@gmail.com> on 2008/04/15 05:53:14 UTC

How do I insert a file into mySQL?

Hi!

I want to store a file (any file mp3, avi, etc) on the database without
using blob datatype.
I just want to put the address of the file (in my Hard Disck) in mySQL and
load the address of the file to be played on web page.
but I have no idea how this can be done.

+---------------------------------------------
| id |        address         |
+---------------------------------------------
| 1  |c:\videos\video1.avi    |
+---------------------------------------------
-just like you tube =)

Any help / suggestion is very much welcome!

God bless!

-Ryan Webb

Re: [OT] Re: How do I insert a file into mySQL?

Posted by ryan webb <we...@gmail.com>.
Dear Dave,

Thank you for your time in replying to my mail.
Yes you are correct my english is quite confusing.
I will follow your advise and ask to database mailing-list.

regards,
Ryan Webb

On 4/15/08, Dave Newton <ne...@yahoo.com> wrote:
> Perhaps this would be better asked on a mailing list relating to databases.
>
> --- ryan webb <we...@gmail.com> wrote:
> > I want to store a file (any file mp3, avi, etc) on the database without
> > using blob datatype.
>
> No, you want to store the path of a file in the database.
>
> > I just want to put the address of the file (in my Hard Disck) [...]
>
> See?
>
> > in mySQL and load the address of the file to be played on web page.
> > but I have no idea how this can be done.
>
> That confuses me. Why wouldn't you just store the path of the file in the
> database like you're saying you want to? You provided an example of it.
>
> What are you really asking, and how is it related to Struts?
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


[OT] Re: How do I insert a file into mySQL?

Posted by Dave Newton <ne...@yahoo.com>.
Perhaps this would be better asked on a mailing list relating to databases.

--- ryan webb <we...@gmail.com> wrote:
> I want to store a file (any file mp3, avi, etc) on the database without
> using blob datatype.

No, you want to store the path of a file in the database.

> I just want to put the address of the file (in my Hard Disck) [...]

See?

> in mySQL and load the address of the file to be played on web page.
> but I have no idea how this can be done.

That confuses me. Why wouldn't you just store the path of the file in the
database like you're saying you want to? You provided an example of it.

What are you really asking, and how is it related to Struts?

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org