Hi All MySQL users
I am having a slight problem and getting inot a bit of a tizz.
I have two tables and I am trying to produce a dropdown select menu whilst
creating a join. The two tables are as follows...
CREATE TABLE itinerary (
i_id int(3) unsigned NOT NULL auto_increment,
i_title varchar(100) default NULL,
i_description mediumtext,
i_category int(3) unsigned default NULL,
i_ordernumber int(3) unsigned default NULL,
i_text mediumtext,
i_image1 varchar(255) default NULL,
i_image2 varchar(255) default NULL,
i_image3 varchar(255) default NULL,
PRIMARY KEY (i_id),
UNIQUE KEY i_id (i_id),
KEY i_id_2 (i_id)
) TYPE=MyISAM;
and
CREATE TABLE dates2 (
d_id int(3) unsigned NOT NULL auto_increment,
d_objid int(3) unsigned default NULL,
d_startdate date default NULL,
d_enddate date default NULL,
PRIMARY KEY (d_id),
UNIQUE KEY d_id (d_id),
KEY d_id_2 (d_id)
) TYPE=MyISAM;
The two fields that are associated are dates2.d_objid and itinerary.i_id what I
want to do is pull out the dates for a selected itinerary.i_id and present them
in a select menu. I am using php but it's been a while and have only got so far
inot a tizz :)
Can anyone shed a little light on the quesry or a bit of guidance on how to
approach this?
Thank you
Andrew