Importing / Adding Fields Into MySql From A List
| From: | revDAVE | Date: | Sat, 12 Apr 2008 17:53:28 +0000 |
| Subject: | Importing / Adding Fields Into MySql From A List | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-272942@lists.php.net to get a copy of this message | ||
Newbie question!
I have a list of field names from another database (not mysql) - like:
name
phone1
phone2
street
city
state
zip
info
etc.... (a bunch more fields)
Q: Is there a way I can add these to an existing empty/blank table?
I have phpMyAdmin and If there's a way add tables w / php - maybe that would
work also....
If I can just get all the field names in the table as text fields - that
would be ok for now - then I can individually change the field type by hand
w phpMyAdmin...
BTW: What is the best field type for 'average' text (not large 'BLOBS')
like:
1 - Street address - maybe less than 255 characters
2 - Info field - maybe more than 255 characters
- (let's assume that user might want to search on the fields):
-text?
-char?
-TINYTEXT?
-mediumtext?
-varchar?
-longtext?
Q: Is there a url to read about the types?
I'm looking at these now but not quite sure ...
http://dev.mysql.com/doc/refman/5.1/en/char.html
http://dev.mysql.com/doc/refman/5.1/en/blob.html
--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists]