Old 07-19-2005   #1 (permalink)
Registered User
 
Uncle Ghed's Avatar
 

Join Date: Jun 2005
Location: Rome, Italy
Posts: 82
Images: 2

Send a message via MSN to Uncle Ghed
Putting images in MySql

I've got myself to the point where i have a table with all the fields I need (id, title, content, date, category Id).
I heard you can put images directly into a Mysql db. This means I need a new field, i think... Anyone can point out a tutorial for this?
(I believe i recall the images with the mysql_fetch_object function, and can format them in my display page...)
__________________
some day I'll understand why on earth I started drawing...
Uncle Ghed is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-19-2005   #2 (permalink)
Registered User
 
Ripper's Avatar
 

Join Date: Jun 2005
Location: Finland
Posts: 46
Images: 7

This link helped me with the same issue: http://www.devarticles.com/c/a/MySQL...PHP-and-MySQL/
Hopefully you'll find it useful too.
__________________
- Rip
Ripper is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-19-2005   #3 (permalink)
ParaSnake
Guest
 

Posts: n/a

This is as easy as puttng a text in MySQL
PHP Code:
$img "<img scr = 'path'>";
mysql_query("INSERT INTO tbl(img_field) VALUES('".$img."') "); 
Output it:
PHP Code:
//connect to db
$query mysql_query("SELECT * FROM tbl");
while(
$a mysql_fetch_assoc($query) {
          
$img_path $a['img'];
          echo 
$img."<BR>";

Hope this is what you are looking for.
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-19-2005   #4 (permalink)
Registered User
 
Uncle Ghed's Avatar
 

Join Date: Jun 2005
Location: Rome, Italy
Posts: 82
Images: 2

Send a message via MSN to Uncle Ghed
Both of you have helped a lot!! Thanks! ^^
Uncle Ghed is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-20-2005   #5 (permalink)
ParaSnake
Guest
 

Posts: n/a

nah,not me,i read the articles on devshed and i realized that i dint got what u mean corectly,sorry
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-21-2005   #6 (permalink)
Registered User
 
Uncle Ghed's Avatar
 

Join Date: Jun 2005
Location: Rome, Italy
Posts: 82
Images: 2

Send a message via MSN to Uncle Ghed
As a matter of fact....
What I'm trying to do is a table that has an Id, a few other fields and a blob field, containing the image. This way when I call my row my Image is associated via database to my other fields, containing a title, a news, a date, etc...
Now: how the heck do I display this image? do I need an extra field called, uhm, "nameImage" or something? or do I just display it with the $fileType $fileContent variables?
I'm getting pretty messed up...
__________________
some day I'll understand why on earth I started drawing...
Uncle Ghed is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 07-21-2005   #7 (permalink)
Registered User
 
scrowler's Avatar
 
Snake Champion!
Join Date: Feb 2004
Location: New Zealand
Posts: 590
Images: 7

Send a message via MSN to scrowler
if you wanna keep the original image name, then yes you need another column. basically do this:

get data from database
set header type to image : header("Content-type: image/jpeg"); etc
echo the data
__________________
BioRUST Tutorials - the birthplace
scrowler is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
php and mySQL loverofbeats HTML / PHP / ASP / JS 4 10-24-2008 12:39 PM
Putting a image to the front of my iframe.. ecntrc HTML / PHP / ASP / JS 0 12-23-2006 08:27 PM
MYSQL Help Neil_8_24_93 HTML / PHP / ASP / JS 2 08-07-2006 07:15 PM
ASP and mySQL bedlam123 HTML / PHP / ASP / JS 3 05-08-2006 03:27 PM
Overlapping Images: Putting images on top of another jasonchan483 Adobe Photoshop 5 07-30-2005 11:29 AM


All times are GMT +1. The time now is 08:23 AM.

Powered by vBulletin Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT