MySQL Forums
Forum List  »  Newbie

Re: help need with relations
Posted by: Maciej Glinkowski
Date: May 26, 2005 11:30PM

how to put this primary key? i've got for example structure:

CREATE TABLE TBook (
IDbook smallint(5) unsigned NOT NULL auto_increment,
IDauthor smallint(5) NOT NULL default '0',
title varchar(50) NOT NULL default '',
PRIMARY KEY (IDbook)
) TYPE=MyISAM;

CREATE TABLE TAuthor (
IDauthor smallint(5) unsigned NOT NULL auto_increment,
name varchar(50) NOT NULL default '',
PRIMARY KEY (IDauthor)
) TYPE=MyISAM;

and i want that field TBook.IDauthor = TAuthor.IDauthor and to show me in this field TAuthor.name in browser instead of number... in phpmyadmin i've got here number with link the text

Options: ReplyQuote


Subject
Written By
Posted
Re: help need with relations
May 26, 2005 11:30PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.