Hi to All,

There is a page on our hospitals website where a patient can look at the
choice of different doctors with their credentials, publications, hobbies,
etc.Each doctor has or will have a 3-4KB jpeg image as well.

We are using MySQL5.0.2.7 with PHP5.2.1
My question concerns the following:
The existing table's fields with one for the image:

TABLE finddoc
id-int,not null, auto inc., unsigned,
name varchar(25),
desig varchar(30),
dept varchar(20),
email varchar(50),
image varchar(6000),
qualification varchar(100),
publications longtext,
areaofinterest longtext, not null,
achievements longtext not null,

My job is to develop a page where a admin user can create and edit
existing doctor profiles. My question is about the image uploading part.
I have a feeling the one field given to me for images is quite limited. 
Would it not be better to add another table with all the image info. such
as the following?

CREATE TABLE image (
image_id int(10) unsigned NOT NULL auto_increment,
image_type varchar(50) NOT NULL default '',
image longblob NOT NULL,
image_size bigint(20) NOT NULL default '0',
image_name varchar(255) NOT NULL default '',
image_date datetime NOT NULL default '0000-00-00 00:00:00',
UNIQUE KEY image_id (image_id)
);

This will give greater control of the images or better manipulation of data.
If it is recommended by you php/mysql higher souls to add a table such as
this.  Then I have more questions.  Or perhaps the existing table is fine.
One might guess I inherited this project.
Blessings,
Chetan

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to