Reply to Re: Learning php Sql

Your name:

Reply:


Posted by Frankly on 06/21/06 04:26

"J.O. Aho" <user@example.net> wrote in message
news:4fqn78F1jt57qU1@individual.net...
> Frankly wrote:
>> its just about 3am here. I was having a hard time sleeping so i figured
>> i
>> would give this another shot.
>>
>> 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.
>
>
>> 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.
>
>
> Haven't slept much myself tonight, so I will be off early today.
>
>
> //Aho

I had a little too much wine tonight so im not about to even think about
that last post of yours :).
I just came to reply to a couple of posts I havnt replied to.
Constraints? well i could cheat and look it up.. I really dont know what
that is - it was done within the Administrator while i was doing what ever
it was I was doing.
Cascades... I believe will help me for if for some reason a building is sold
to a new owner.
I am thinking that cascades are needed to cascade the changes to all the
related records in other tables.
my plan for tonight is to sleep like a baby :).

Frank

[Back to original 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

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