473,322 Members | 1,911 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

how to store path of image in the mysql database

hi
i am using hibernate store the image in database
but only the image file name is stored.
and i want to store also path of that image.

and one more thing
if i use the same code run on the IE then the database store image path what a want exact.
but if i use that form of jsp page in mozila firefox then the code only store the image file name in the database.
Expand|Select|Wrap|Line Numbers
  1.  
  2. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
  3.     <script>
  4.     function readURL(input)
  5.     {
  6.         if (input.files && input.files[0])
  7.         {
  8.             var reader = new FileReader();
  9.             reader.onload = function (e)
  10.             {
  11.                 $('#example').attr('src', e.target.result).width(150).height(150);
  12.             };
  13.             reader.readAsDataURL(input.files[0]);
  14.         }
  15.     }
  16.     </script>
  17.     <meta charset=utf-8 />
  18.     <!--[if IE]>
  19.     <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  20.     <![endif]-->
  21.  
THIS IS file which i am use.
and on the form
Expand|Select|Wrap|Line Numbers
  1. <img src="images/fileimage.jpg" id="example" style="width: 150px; height: 150px; border: 2px;" />
  2. <input type="file" name="Images" id="Images" onchange="readURL(this);"/>
  3.  
Jun 27 '12 #1
0 1936

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Rudy | last post by:
Hello all! I am amazed how many posts I have read to store an image in SQL, and just as many against it. So I learned how to store an image in a SQL db and retrieve the image. A little tricky,...
5
by: lawrence k | last post by:
I'm a little weak on my basic I/O. Help me out please. Is it right to say that I can just open any file with file(), get it as a string, and then store in a MySql database, in, say, a MediumText...
7
by: mukeshpatil | last post by:
How to get data from .CSV file using php & store it into Mysql database I want to read data from two different .CSV files using php & How to store it into Mysql Database tables Please help me...
1
by: Glenn Coyle | last post by:
Hi I am having trouble writing the file path of a image to the database,also for some reason it is not uploading the images, anyone have any ideas? the code is below: if($_POST ==...
7
by: kiranrredy | last post by:
Hi, I need to get the data from XML file , to store it in MySql database. How can i do it. Regards, KiranRredy
2
by: geevaa | last post by:
how to copy a database or table in a database to my pen drive? In which path the MYSQL database and tables will be stored? i just wanto insert a new fieldname(column)in my table .. not as the...
3
by: vivekgoyal | last post by:
hello guys, i need your help... i face problem in storing image in database... can any one send me the complete coding of storing image in database... please i need ur help... plz try to send me...
2
by: maheshonmail | last post by:
i want to store pictures in mysql database using php code/ so please send me the most efficient code for doing this.
1
by: twinkle2010 | last post by:
Hi I am a new web programmer.I got an issue that reads the excel sheet data and store it to MYSQL database using php. I dont have any idea on that. can you help me?
2
ilya Kraft
by: ilya Kraft | last post by:
Hello, I came across following problem. I need to sort content by categories on my web page. Just like in bytes.com. User chooses area that is related to his / her question (PHP, JavaScript, HTML...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.