You are here: Re: Learning php Sql « PHP SQL « IT news, forums, messages
Re: Learning php Sql

Posted by Frankly on 06/20/06 17:37

>> CREATE DATABASE `myweb325573_grace`;
>
> This creates the database itself, you don't need this at this moment, as
> it's already created.
>
>
>> DROP TABLE IF EXISTS `myweb325573_grace`.`RelationManagementsBuildings`;
>
> This removes the table RelationManagementsBuildings, if it already exists
> in the database.
>

those are just statements that were included when i copied the SQL.

>
>> CREATE TABLE `RelationManagementsBuildings` (
>>
>> `ManID` int(10) unsigned NOT NULL default '0',
>>
>> `BuildingID` int(10) unsigned NOT NULL default '0',
>>
>> PRIMARY KEY (`ManID`,`BuildingID`),
>
> This seems okey.
>
>> CONSTRAINT `FK_RelationManagementsBuildings_1` FOREIGN KEY (`ManID`)
>> REFERENCES `Managements` (`ManID`) ON DELETE CASCADE ON UPDATE CASCADE
>
> Haven't used Constraints and cascades, I guess I should read on them, but
> the part here you could drop without it affecting the main functionality
> of the table, if you remove this, don't forget to remove the comma after
> the definition of the primary keys.

but isnt this the part the creates the actual join? this is where I am
having trouble. i did that one fine
but when i try to make the join using the 2nd part of the primary key which
is Buildings and make the join with the buildings table is when i get the
mysql error 1005 (errno:150) if i dont need this join than my tables are
complete. lol at least i think they are.

Frank

>
>
> Haven't slept much myself tonight, so I will be off early today.
>
>
> //Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация