|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
no resize - just display
Hi,
I am an absolute mysql beginner and could manage to insert an image from my local machine into the db on my web server table (as 'diretory/image.jpg' , varchar). The image belongs to a data set with 'name' , 'place' , 'fotografer' , 'location'(this is the web directory with the pic) and 'status'. Now I begin to work on the select section on a page where I want to display only one data set, the one where 'status' = pic of the week. I have no problem to display the 'name','place','fotografer' data, but how should I call the pic. I do not care about any resizing or kb limitation, since I will be the only user. What I want to do is upload my pics to the server (done) and then display them one per week. Thank you in advance |
|
#2
|
||||
|
||||
|
Just print it out using HTML: <img src="<?php echo $value_from_db; ?>">
|
|
#3
|
|||
|
|||
|
well, what I don't understand is how to define $value:from_db . I have uploaded two pics, the urls are 'images/pic1.jpg' and 'images/pic2.jpg'.
Each belongs two a different data set. I will select a set using a where clause, the condition is that the 'status' field must say 'pic of the week' , this is how I will be able to change the pic on the pic of the week page changing only the status field via my admin section. Thank you in advance |
|
#4
|
||||
|
||||
|
You said you can display the other information from the database... how is retreiving the image location string any different than retrieving the name or place?
SELECT picture FROM [table] WHERE status='pic of the week' |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > no resize - just display |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|