I have two tables defined:
CREATE TABLE `tga_body` (
`body_id` int(10) unsigned NOT NULL auto_increment,
`blob_pos` mediumint(8) unsigned NOT NULL,
`file_id` int(10) unsigned NOT NULL,
`blob_id` int(10) unsigned NOT NULL,
PRIMARY KEY USING BTREE (`body_id`),
KEY `file_id` (`file_id`),
KEY `blob_id` (`blob_id`)
) ENGINE=MyISAM;
CREATE TABLE `tga_body_blob` (
`blob_id` int(10) unsigned NOT NULL auto_increment,
`blob_data` mediumblob NOT NULL,
PRIMARY KEY USING BTREE (`blob_id`),
KEY `blob_data` (`blob_data`(64))
) ENGINE=MyISAM;
I need to select all tga_body_blob.blob_data where tga_body.blob_id is
equal to tga_body_blob.blob_id and tga_body.file_id is equal to
'some_name' ordered by tga_body.blob_pos.
I can type in english what I want. However, I am stumped on the select
statement. I'm speculating I will need to use some form of JOIN but am
unsure.
-d
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org