Re: How to do simple stuff

2001-09-06 Thread Deryck Henson

Let me rephrase that checkbox one::

TRUE or FALSE

- Deryck H
- http://www.comp-u-exchange.com
- Original Message -
From: Mike Wexler [EMAIL PROTECTED]
To: Deryck Henson [EMAIL PROTECTED]
Cc: MySQL [EMAIL PROTECTED]
Sent: Wednesday, September 05, 2001 10:19 PM
Subject: Re: How to do simple stuff




 Deryck Henson wrote:
 
  How do I::
 
  Add a column

 ALTER TABLE myTable ADD COLUMN myColumn VARCHAR(27)

  Alter a table to fit a different character lengths (say...unlimited in a
1
  column)

 ALTER TABLE myTable CHANGE COLUMN myColumn myColumn TEXT

  or
  alter column to accept an unlimited amount of characters

 ALTER TABLE myTable CHANGE COLUMN myColumn myColumn TEXT

  Make a column have a check box instead of characters(VARCHAR...) or date
  (DATE)

 mysql doesn't control your UI. You would have to reconfigure whatever
 software is presenting your UI.


 
  thanx
  - Deryck H
  - http://www.comp-u-exchange.com
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
[EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: How to do simple stuff

2001-09-06 Thread Gerald Clark



Deryck Henson wrote:

 How do I::
 
 Add a column

Did you read the manual?

 Alter a table to fit a different character lengths (say...unlimited in a 1
 column)
 or
 alter column to accept an unlimited amount of characters

The concept of unlimited characters does not exist in the real world.
The closest you will get is varchar, text, or blob in its largest size.

 Make a column have a check box instead of characters(VARCHAR...) or date
 (DATE)

Check boxes are an HTML thing, not SQL.  Try PHP.
Dates exist. Again, read the manual.

 
 thanx
 - Deryck H
 - http://www.comp-u-exchange.com
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail 
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-- 
Gerald L. Clark
[EMAIL PROTECTED]


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: How to do simple stuff

2001-09-06 Thread Mike Wexler



Deryck Henson wrote:
 
 Let me rephrase that checkbox one::


 
 TRUE or FALSE

ALTER TABLE myTable CHANGE COLUMN myColumn TINYINT(1)

And you use 1 for TRUE and 0 for FALSE.

 
 - Deryck H
 - http://www.comp-u-exchange.com
 - Original Message -
 From: Mike Wexler [EMAIL PROTECTED]
 To: Deryck Henson [EMAIL PROTECTED]
 Cc: MySQL [EMAIL PROTECTED]
 Sent: Wednesday, September 05, 2001 10:19 PM
 Subject: Re: How to do simple stuff
 
 
 
  Deryck Henson wrote:
  
   How do I::
  
   Add a column
 
  ALTER TABLE myTable ADD COLUMN myColumn VARCHAR(27)
 
   Alter a table to fit a different character lengths (say...unlimited in a
 1
   column)
 
  ALTER TABLE myTable CHANGE COLUMN myColumn myColumn TEXT
 
   or
   alter column to accept an unlimited amount of characters
 
  ALTER TABLE myTable CHANGE COLUMN myColumn myColumn TEXT
 
   Make a column have a check box instead of characters(VARCHAR...) or date
   (DATE)
 
  mysql doesn't control your UI. You would have to reconfigure whatever
  software is presenting your UI.
 
 
  
   thanx
   - Deryck H
   - http://www.comp-u-exchange.com
  
   -
   Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
  
   To request this thread, e-mail [EMAIL PROTECTED]
   To unsubscribe, e-mail
 [EMAIL PROTECTED]
   Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
 [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: How to do simple stuff

2001-09-06 Thread Mike Barber

http://www.anse.de/mysqlfront/

Use a GUI it's a lot easier
- Original Message - 
From: Attila Soki [EMAIL PROTECTED]
To: MySQL [EMAIL PROTECTED]
Sent: Wednesday, September 05, 2001 11:03 PM
Subject: Re: How to do simple stuff


 hi
 
 | Add a column
 
 add an integer column:
 alter table sometable add somecolumn int;
 
 add an varchar column:
 alter table sometable add somecolumn varchar(255);
 
 see: mysql doc 7.8 Alter table syntax
 
 | Alter a table to fit a different character lengths
 |(say...unlimited in a 1 column)
 
 simply specify the new column parameters:
 
 alter table sometable modify tooshortcolumn varchar(255);
 
 note: unlimited column length not exists.
 if you need a realy BIG character type column try the text types
 (text mediumtext, etc...)
 see mysql doc: 7.3 Column types
 
 sorry i can't understand this:
 | Make a column have a check box instead of characters(VARCHAR...)
 
 bye,
 
 ati
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: How to do simple stuff

2001-09-06 Thread Adams, Bill TQO

Mike Wexler wrote:

 Deryck Henson wrote:
 
  Let me rephrase that checkbox one::

 
  TRUE or FALSE

 ALTER TABLE myTable CHANGE COLUMN myColumn TINYINT(1)

 And you use 1 for TRUE and 0 for FALSE.

Or ENUM:
ALTER TABLE myTable CHANGE COLUM myColumn ENUM( 'T', 'F' );

Of course if you are using this to drive a web page Mike's solution is better.
 Or you would want to enum( 1, 0 ) or enum( '1', '' );

--Bill



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: How to do simple stuff

2001-09-06 Thread Henning Schroeder

At 17:25 06.09.01, you wrote:
Or ENUM:
ALTER TABLE myTable CHANGE COLUM myColumn ENUM( 'T', 'F' );

Of course if you are using this to drive a web page Mike's solution is better.
  Or you would want to enum( 1, 0 ) or enum( '1', '' );


yes, but do *not* use enum('t','f') because with some fonts they are not 
easily distinguised. it is not very funny to find the one f within a 
column of 30 ts. :-)

and think about clever defaults here.

henning



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




How to do simple stuff thanx

2001-09-06 Thread Deryck Henson

Thank you to everyone who helped.  That enum worked great and right after I
posted I checked the manual again for the columns and got it.  Once again,
thanx, and I'll post more here.  Anyway, the true false thing was for a
members section of my web site that says that if they confirmed their email,
update the database table in an sql query to say true, and default is false.

- Deryck H
- http://www.comp-u-exchange.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




How to do simple stuff

2001-09-05 Thread Deryck Henson

How do I::

Add a column
Alter a table to fit a different character lengths (say...unlimited in a 1
column)
or
alter column to accept an unlimited amount of characters
Make a column have a check box instead of characters(VARCHAR...) or date
(DATE)

thanx
- Deryck H
- http://www.comp-u-exchange.com


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: How to do simple stuff

2001-09-05 Thread Attila Soki

hi

| Add a column

add an integer column:
alter table sometable add somecolumn int;

add an varchar column:
alter table sometable add somecolumn varchar(255);

see: mysql doc 7.8 Alter table syntax

| Alter a table to fit a different character lengths
|(say...unlimited in a 1 column)

simply specify the new column parameters:

alter table sometable modify tooshortcolumn varchar(255);

note: unlimited column length not exists.
if you need a realy BIG character type column try the text types
(text mediumtext, etc...)
see mysql doc: 7.3 Column types

sorry i can't understand this:
| Make a column have a check box instead of characters(VARCHAR...)

bye,

ati

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: How to do simple stuff

2001-09-05 Thread Mike Wexler



Deryck Henson wrote:
 
 How do I::
 
 Add a column

ALTER TABLE myTable ADD COLUMN myColumn VARCHAR(27)
 
 Alter a table to fit a different character lengths (say...unlimited in a 1
 column)

ALTER TABLE myTable CHANGE COLUMN myColumn myColumn TEXT

 or
 alter column to accept an unlimited amount of characters

ALTER TABLE myTable CHANGE COLUMN myColumn myColumn TEXT

 Make a column have a check box instead of characters(VARCHAR...) or date
 (DATE)

mysql doesn't control your UI. You would have to reconfigure whatever
software is presenting your UI.


 
 thanx
 - Deryck H
 - http://www.comp-u-exchange.com
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php