Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

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 Codewalkers 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 March 13th, 2003, 05:55 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
what "type" would i use for this field...

for an icq number field...what "type" would i set for this.

I have tried using what i thought it would be but it always puts a default of 0. Is there anyway to get around this so that instead of displaying a default of 0 is just shows a blank field

Reply With Quote
  #2  
Old March 13th, 2003, 10:20 AM
xs0 xs0 is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Ljubljana, Slovenia
Posts: 760 xs0 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: what

Well, one way is not using NOT NULL on the field, another is using char(10) (maybe something other than 10, i'm not that familiar with ICQ), which will default to empty string...

chars are somewhat slower that numbers, though, so you might want to leave it as it is and change your PHP to check for 0... OTOH, it probably doesn't matter that much

Reply With Quote
  #3  
Old March 13th, 2003, 04:52 PM
Danicek Danicek is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Czech Republic
Posts: 79 Danicek User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to Danicek
RE: what

I do not think you need to change it, php will do it and if you fill this values (sometimes) in table, you can use it. Print it in table or do something like if($icq==0): echo(&nbsp;);
Empty fields are not good idea.

Reply With Quote
  #4  
Old March 13th, 2003, 04:55 PM
xs0 xs0 is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Location: Ljubljana, Slovenia
Posts: 760 xs0 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: what

Just wondering - why do you feel a 0 is better than an empty string (or NULL, for that matter)?

Reply With Quote
  #5  
Old March 13th, 2003, 08:35 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: what

just because i'm a picky person i guess....i think it just looks better in the profiles that i'm making that if someone doesn't have an icq number it leaves the field blank like all the other empty fields....a 0 just makes it look ....not right to me...lol

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > what "type" would i use for this field...


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 3 hosted by Hostway