HighDots Forums  

Error:: Building a Blog in Dreamweaver with PHP and

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Error:: Building a Blog in Dreamweaver with PHP and in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jneffnyc
 
Posts: n/a

Default Error:: Building a Blog in Dreamweaver with PHP and - 11-01-2004 , 02:20 PM






I'be been floowing the direction for build a blog from the developer section
and it mentionscreating a foriegn key for idtop_art But I don't see how to
create this part of the database. Does anyone know how to create a foriegn key
between two databases? Thanks


Reply With Quote
  #2  
Old   
Marius2004
 
Posts: n/a

Default Re: Error:: Building a Blog in Dreamweaver with PHP and - 11-03-2004 , 04:11 AM






MySQL is not a purely-relational database language. This means the idtop_art
field will not really be linked in any way to the id_top field, except as a
concept. Conceptually, a foreign key is a reference to a field in another
table, which logically links records from the two tables. Basically, the
idtop_art stores the unique ID of the topic associated to the current article,
so you would know which article belongs to which topic.

In the actual tutorial, you don't have to do anything to create the foreign
key. Just execute the sample code in the MySQL console:

CREATE TABLE blg_article_art (
id_art int(11) NOT NULL auto_increment,
idtop_art int(11) NOT NULL default '0',
title_art varchar(100) NOT NULL default '',
description_art varchar(255) NOT NULL default '',
text_art longtext NOT NULL,
date_art datetime default NULL,
PRIMARY KEY (id_art));

Good luck!


Reply With Quote
  #3  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Error:: Building a Blog in Dreamweaver with PHP and MySQL Part 1: - 11-03-2004 , 08:32 AM



.oO(Marius2004)

Quote:
MySQL is not a purely-relational database language. This means the idtop_art
field will not really be linked in any way to the id_top field, except as a
concept.
In its default configuration with MyISAM tables MySQL ignores them, but
if you use InnoDB for example you can use foreign key constraints.

Micha


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.