Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old August 2nd, 2002, 12:25 PM
Kimppa Kimppa is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2001
Location: Finland
Posts: 706 Kimppa User rank is Sergeant (500 - 2000 Reputation Level)Kimppa User rank is Sergeant (500 - 2000 Reputation Level)Kimppa User rank is Sergeant (500 - 2000 Reputation Level)Kimppa User rank is Sergeant (500 - 2000 Reputation Level)Kimppa User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 Days 18 h 5 m 46 sec
Reputation Power: 15
(MySQL) creating table , VARCHAR (<<unlimited>>)

I'm creating a guestbook, and the messages will be saved in a database. But as I don't know how long the visitors message will be so I can't set a limit for VARCHAR. I'd like to have it as unlimited, how do I set it?

mysql_query ("create table news(date VARCHAR(20), sender VARCHAR(100), topic VARCHAR(50), msg VARCHAR(unlimited)") or die("err... wont work");
__________________
Fatal error on row 561: Couldn't access life - life isn't set

Last edited by Kimppa : August 2nd, 2002 at 12:29 PM.

Reply With Quote
  #2  
Old August 2nd, 2002, 01:08 PM
NoXcuz's Avatar
NoXcuz NoXcuz is offline
Wiking
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Sep 2000
Location: Sweden
Posts: 3,608 NoXcuz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 49 m 27 sec
Reputation Power: 11
FYI - This belongs in the mysql forum...
The 'unlimited VARCHAR' type in MySQL is a TEXT column, and there are also different kinds of those available. For more info, see the manual.

//NoXcuz
__________________
UN*X is sexy!
who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; gasp; yes; uptime; umount; sleep

Reply With Quote
  #3  
Old August 2nd, 2002, 01:14 PM
Kimppa Kimppa is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2001
Location: Finland
Posts: 706 Kimppa User rank is Sergeant (500 - 2000 Reputation Level)Kimppa User rank is Sergeant (500 - 2000 Reputation Level)Kimppa User rank is Sergeant (500 - 2000 Reputation Level)Kimppa User rank is Sergeant (500 - 2000 Reputation Level)Kimppa User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 Days 18 h 5 m 46 sec
Reputation Power: 15
Ok, thank you.

Sorry for posting it on the wrong section, honestly I tried to look for a MySQL section but didn't see it. Heheh, see it now

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > (MySQL) creating table , VARCHAR (<<unlimited>>)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway