Hello,

I working on a small my project to learn more about joins. I have three tables here is what they look like

CREATE TABLE `album` (
`album_id` smallint(3) NOT NULL auto_increment,
`name` text NOT NULL,
`description` text NOT NULL,
`img_id` smallint(5) NOT NULL default '0',
PRIMARY KEY (`photo_album_id`)
) TYPE=MyISAM;

CREATE TABLE `images` (
`img_id` smallint(3) unsigned NOT NULL auto_increment,
`img_path` varchar(60) default NULL,
`img_caption_id` smallint(5) NOT NULL default '0',
PRIMARY KEY (`img_id`)
) TYPE=MyISAM;

CREATE TABLE `img_caption` (
`caption` text NOT NULL,
`img_caption_id` smallint(5) NOT NULL auto_increment,
PRIMARY KEY (`img_caption_id`)
) TYPE=MyISAM;

Is it possible write a join query that would join the album table and the images table and then join the images table with the img_caption table?. I would like to select name and description from album , img_path from images, and caption from img_caption for any paticluar album row.

Thanks in advance for the help,
Mike




---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to