Re: [PHP-DB] Alter Table / ADD col_name

2002-01-18 Thread Keith Webb

Many thanks.

regards

keith
"Miles Thompson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Keith,
>
> You're building it upside down! If your design relies on adding columns to
> store data you will quickly run out of columns.
>
> More typically when you submit data you add a row of information to a
> database, not another column.  Database design and normalization are
topics
> which are too big to cover in an email, but there are a number of
> helpful  tutorials. This one is pretty decent:
>
> http://www.devshed.com/Server_Side/MySQL/Normal/Normal1/page1.html
>
> The author describes both why data has to be normalized and how that is
> done. An internal link points to another article which helps you determine
> what to include in the tables.
>
> If the above doesn't suite, Google will return a slew of hits on "sql
> tutorial normalization".
>
> I hope this will be helpful - Miles Thompson
>
>
>
> At 02:13 PM 1/17/2002 +, Keith Webb wrote:
> >Ok i'm new to this stuff so maybe someone can give me a quick pointer on
> >this one.
> >
> >I want to add a new column / Field with the date to a database every time
> >the submit button is clicked.
> >
> >PHP doesn't seem to support the ALTER TABLE command from mysql or the ADD
> >command.
> >
> >Is there a way to do this?
> >
> >Or am I building this upside down so to speak!!!
> >
> >thanks
> >
> >keith
> >
> >
> >
> >--
> >PHP Database Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Alter Table / ADD col_name

2002-01-18 Thread Keith Webb

Many thanks for your response , I will work on the design decision first and
maybe store this code for later!

Keith


"Rick Emery" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Other than what sounds like a bad design decision, you can:
>
> $query = "ALTER TABLE mytable ADD COLUMN newcol INT UNSIGNED AFTER
> anothercol";
> mysql_query($query) or die("Error: ".mysql_error() );
>
> -Original Message-
> From: Keith Webb [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 17, 2002 8:13 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Alter Table / ADD col_name
>
>
> Ok i'm new to this stuff so maybe someone can give me a quick pointer on
> this one.
>
> I want to add a new column / Field with the date to a database every time
> the submit button is clicked.
>
> PHP doesn't seem to support the ALTER TABLE command from mysql or the ADD
> command.
>
> Is there a way to do this?
>
> Or am I building this upside down so to speak!!!
>
> thanks
>
> keith
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Alter Table / ADD col_name

2002-01-17 Thread Rick Emery

Other than what sounds like a bad design decision, you can:

$query = "ALTER TABLE mytable ADD COLUMN newcol INT UNSIGNED AFTER
anothercol";
mysql_query($query) or die("Error: ".mysql_error() );

-Original Message-
From: Keith Webb [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 17, 2002 8:13 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Alter Table / ADD col_name


Ok i'm new to this stuff so maybe someone can give me a quick pointer on
this one.

I want to add a new column / Field with the date to a database every time
the submit button is clicked.

PHP doesn't seem to support the ALTER TABLE command from mysql or the ADD
command.

Is there a way to do this?

Or am I building this upside down so to speak!!!

thanks

keith



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Alter Table / ADD col_name

2002-01-17 Thread Miles Thompson

Keith,

You're building it upside down! If your design relies on adding columns to 
store data you will quickly run out of columns.

More typically when you submit data you add a row of information to a 
database, not another column.  Database design and normalization are topics 
which are too big to cover in an email, but there are a number of 
helpful  tutorials. This one is pretty decent:

http://www.devshed.com/Server_Side/MySQL/Normal/Normal1/page1.html

The author describes both why data has to be normalized and how that is 
done. An internal link points to another article which helps you determine 
what to include in the tables.

If the above doesn't suite, Google will return a slew of hits on "sql 
tutorial normalization".

I hope this will be helpful - Miles Thompson



At 02:13 PM 1/17/2002 +, Keith Webb wrote:
>Ok i'm new to this stuff so maybe someone can give me a quick pointer on
>this one.
>
>I want to add a new column / Field with the date to a database every time
>the submit button is clicked.
>
>PHP doesn't seem to support the ALTER TABLE command from mysql or the ADD
>command.
>
>Is there a way to do this?
>
>Or am I building this upside down so to speak!!!
>
>thanks
>
>keith
>
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]