Hi!
Id would like to have 4 tables
files (
id int(8),
type set("directory", "file", "link"),
)
files_directory (
id int(8),
is_files int(8),
name varchar(20)
...
)
files_file (
id int(8),
is_files int(8),
name varchar(20)
...
)
files_link (
id int(8),
is_files int(8),
name varchar(20)
...
)
And be able to make one query to get the info from, for example the
"files_directory"-table just having an id for the "files"-table, such as:
select files.type as #type, files_#type.* from files, files_#type where
files.id =$id and files_$type.is_files=$id
$id is a value from php-script
#type is a for me imaginary value that I would like mysql to generate and
being able to use.
is this possible, or should I rename the values in the "files.type"-set to
"files_directory, files_file, "files_link"? or wouldn't this help either?
regards, tomas
---------------------------------------------------------------------
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