Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
PHP inserting vales into MYSQL
Old 01-21-2009, 06:59 AM Re: PHP inserting vales into MYSQL
millwalll's Avatar
Webmaster Talker

Posts: 674
Name: James
Location: KENT
Trades: 3
After running your script i get failure\n
Column count doesn't match value count at row 1
__________________

Please login or register to view this content. Registration is FREE
millwalll is offline
Reply With Quote
View Public Profile Visit millwalll's homepage!
 
 
Register now for full access!
Old 01-21-2009, 07:27 AM Re: PHP inserting vales into MYSQL
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
This means that you either are missing a column, or have too much columns specified in your query.
Looking at your query, it's obvious. You have a "SurveyId" field, that you are not indicating in your query.
You should erplace
PHP Code:
INSERT INTO Survey VALUES ('$Email','$Movies','$Score','$Score1','$Score2','$Score'
with
PHP Code:
INSERT INTO Survey (EmailMoviesScoreScore1Score2Score3VALUES ('$Email','$Movies','$Score','$Score1','$Score2','$Score'
That way, you tell the DB which data goes in which columns.
If you left the definition out, it tries to put the first value in the first column.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 01-21-2009, 07:41 AM Re: PHP inserting vales into MYSQL
millwalll's Avatar
Webmaster Talker

Posts: 674
Name: James
Location: KENT
Trades: 3
Hi thanks sorted that problem out Many thanks for all your help
__________________

Please login or register to view this content. Registration is FREE

Last edited by millwalll; 01-21-2009 at 07:56 AM..
millwalll is offline
Reply With Quote
View Public Profile Visit millwalll's homepage!
 
Old 01-21-2009, 02:17 PM Re: PHP inserting vales into MYSQL
millwalll's Avatar
Webmaster Talker

Posts: 674
Name: James
Location: KENT
Trades: 3
Sorted
__________________

Please login or register to view this content. Registration is FREE

Last edited by millwalll; 01-21-2009 at 02:28 PM..
millwalll is offline
Reply With Quote
View Public Profile Visit millwalll's homepage!
 
Reply     « Reply to PHP inserting vales into MYSQL

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.30109 seconds with 11 queries