General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old September 18th, 2002, 04:12 PM
sri2002 sri2002 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Posts: 6 sri2002 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Inserting records into DB trouble

Hi,
I have a php form which inserts records into the mysql db. All the columns
are getting inserted except 4 columns.
My table script is this:
CREATE TABLE mirs_survey1 (
qno tinyint(4) NOT NULL auto_increment,
emailid varchar(255) default NULL,
date date default NULL,
email_alert tinyint(4) NOT NULL default '0',
capitol_capsule tinyint(4) NOT NULL default '0',
mirs_service tinyint(4) NOT NULL default '0',
coverage_written tinyint(4) NOT NULL default '0',
coverage_democrat tinyint(4) NOT NULL default '0',
written_repub tinyint(4) NOT NULL default '0',
ADeep tinyint(4) NOT NULL default '0',
service tinyint(4) NOT NULL default '0',
Mirs_update tinyint(4) NOT NULL default '0',
competitor tinyint(4) NOT NULL default '0',
good tinyint(4) NOT NULL default '0',
accounts tinyint(4) NOT NULL default '0',
list tinyint(4) NOT NULL default '0',
bill tinyint(4) NOT NULL default '0',
price tinyint(4) NOT NULL default '0',
staff tinyint(4) NOT NULL default '0',
Rreport tinyint(4) NOT NULL default '0',
BCalendar tinyint(4) NOT NULL default '0',
Inet tinyint(4) NOT NULL default '0',
Attn tinyint(4) NOT NULL default '0',
version tinyint(4) NOT NULL default '0',
email tinyint(4) NOT NULL default '0',
Mirs_text tinyint(4) NOT NULL default '0',
list_fundraisers tinyint(4) NOT NULL default '0',
content_capsule tinyint(4) NOT NULL default '0',
Mirs_content tinyint(4) NOT NULL default '0',
Mirs_cover tinyint(4) NOT NULL default '0',
Mirs_delivery tinyint(4) NOT NULL default '0',
Mirs_online tinyint(4) NOT NULL default '0',
Mirs_search tinyint(4) NOT NULL default '0',
Mirs_newsemail tinyint(4) NOT NULL default '0',
Mirs_anotherletter tinyint(4) NOT NULL default '0',
Mirs_otherbipolitical tinyint(4) NOT NULL default '0',
Mirs_servicecharge tinyint(4) NOT NULL default '0',
Mirs_keyissues tinyint(4) NOT NULL default '0',
Mirs_othernewsletters tinyint(4) NOT NULL default '0',
Mirs_providemore tinyint(4) NOT NULL default '0',
Mirs_judicial tinyint(4) NOT NULL default '0',
mirs_aspects varchar(255) default NULL,
mirs_likeleast varchar(255) default NULL,
PRIMARY KEY (qno),
UNIQUE KEY qno (qno),
KEY qno_2 (qno),
FULLTEXT KEY emailid (emailid)
)
The column that is not getting inserted are
mirs_aspects varchar(255) default NULL,
mirs_likeleast varchar(255) default NULL,
emailid varchar(255) default NULL,
date date default NULL,
the script can be acessed online at
(http://www.enddebtmisery.com/sri/survey.php).
Any thoughts/ideas?
Thanks
Sri

Reply With Quote
  #2  
Old September 18th, 2002, 04:35 PM
crazytrain81 crazytrain81 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 232 crazytrain81 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
first thought

declare the "default NULL" items as just "NULL"

also, why declare date as default null? why not default 0000-00-00 . that's much more sensible

Reply With Quote
  #3  
Old September 18th, 2002, 05:02 PM
sri2002 sri2002 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Posts: 6 sri2002 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Did not help though??
Thanks
Sri

Reply With Quote
  #4  
Old September 18th, 2002, 06:53 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
OMG, im only 19 and i think you just gave me a heart attack!

OK. *breath in, breath out*, firstly ive look over the sytax and it should work, what i suggest that you do is, create a table with fields that you having problems with, see if that will create those fields.

Also did you type this query by hand or was it created by phpmyadmin, etc??

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Inserting records into DB trouble


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 | 
  
 

Iron Speed




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