Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 13th, 2007, 06:33 AM
Authorized User
 
Join Date: Jan 2007
Location: , , .
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default retrieving an image from a mysql db

how do i display an image saved on a mysql database

Reply With Quote
  #2 (permalink)  
Old March 13th, 2007, 08:01 AM
Friend of Wrox
 
Join Date: Nov 2005
Location: Rotterdam, , Netherlands.
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

What you need to do is make a select query that selects a record from a table.
In that table on of the fields must have a image Url(You can't store an image into a mysql database).
so your query would look something like the following
Code:
Select image_url from images where image_id=1;
when you have retrieved the url its just a matter of doing a echo like:
Code:
echo("<img src=\"".$imageUrl."\" />)
hope that helped

__________________________________________________ ________
I am DJ Kat...that's my name. Its a D and a J and a Kat with a K.
Reply With Quote
  #3 (permalink)  
Old March 16th, 2007, 12:59 PM
Authorized User
 
Join Date: Feb 2007
Location: , , India.
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

fine reply man,....surely did clarify my doubt.
thanks..

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
sending and retrieving image to/from sql mosi C# 2005 1 May 10th, 2008 07:51 AM
Retrieve image data from mysql db vermaarun2005 PHP Databases 0 July 14th, 2007 11:12 AM
Retrieving and uploading image in Database vijay_83 ASP.NET 2.0 Basics 1 October 4th, 2006 03:25 PM
Storing/Retrieving jpgs from MySQL flippyn5 PHP Databases 1 December 9th, 2005 08:15 AM
Inconsistent error when retrieving data from a db darkhalf Classic ASP Databases 2 March 14th, 2004 12:38 PM



All times are GMT -4. The time now is 07:22 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.