User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 363,395 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,927 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:
Views: 495 | Replies: 19 | Solved
Reply
Join Date: Jul 2006
Posts: 155
Reputation: tefflox is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
tefflox's Avatar
tefflox tefflox is offline Offline
Junior Poster

Re: Please help

  #11  
May 14th, 2008
ok, I fixed the $data[0] error.. but do I have to increment `id` somehow, in the query?

testing with the data fix..
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 2,884
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 7
Solved Threads: 208
nav33n's Avatar
nav33n nav33n is online now Online
Posting Maven

Re: Please help

  #12  
May 14th, 2008
No. If `id` is an autoincrement field, you don't have to do anything with it..
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: Jul 2006
Posts: 155
Reputation: tefflox is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
tefflox's Avatar
tefflox tefflox is offline Offline
Junior Poster

Re: Please help

  #13  
May 14th, 2008
Getting closer !!

Column count doesn't match value count at row 1


  1. $sql = "INSERT INTO trucks (`relpath-box1`, `relpath-box2`, `relpath-box3`, `relpath-primary`, `relpath-gallery1`, `relpath-gallery2`, `relpath-gallery3`, `year`, `make`, `model`, `miles`, `comment`, `option1`, `option2`, `option3`, `option4`, `option5`, `option6`, `option7`, `option8`) VALUES ('$data[0]', '$data[1]', '$data[2]', '$data[3]', '$data[4]', '$data[5]', '$data[6]', '$data[7]', '$year', '$make', '$model', '$miles', '$comment', '$option1', '$option2', '$option3', '$option4', '$option5', '$option6', '$option7', '$option8')";
Last edited by peter_budo : May 14th, 2008 at 1:28 pm. Reason: Keep It Organized - please use [code] tags
Reply With Quote  
Join Date: Jul 2006
Posts: 155
Reputation: tefflox is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
tefflox's Avatar
tefflox tefflox is offline Offline
Junior Poster

Re: Please help

  #14  
May 14th, 2008
I see that there are fewer image values than data fields (for the eight images) but I'm confused..
Reply With Quote  
Join Date: Jul 2006
Posts: 155
Reputation: tefflox is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
tefflox's Avatar
tefflox tefflox is offline Offline
Junior Poster

Re: Please help

  #15  
May 14th, 2008
Ah! `relpath-box4` !!
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 2,884
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 7
Solved Threads: 208
nav33n's Avatar
nav33n nav33n is online now Online
Posting Maven

Re: Please help

  #16  
May 14th, 2008
I have already mentioned that problem.. the column count is 20 and the values you are trying to insert is 21.

I hope that fixes it
Last edited by nav33n : May 14th, 2008 at 11:43 am.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: Jul 2006
Posts: 155
Reputation: tefflox is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
tefflox's Avatar
tefflox tefflox is offline Offline
Junior Poster

Re: Please help

  #17  
May 14th, 2008
Yes!

My very first database, works!

Thus, by any power vested in me, I now pronounce you king.
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 2,884
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 7
Solved Threads: 208
nav33n's Avatar
nav33n nav33n is online now Online
Posting Maven

Re: Please help

  #18  
May 14th, 2008
Lol.. Congrats Good job!
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: Jul 2006
Posts: 155
Reputation: tefflox is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
tefflox's Avatar
tefflox tefflox is offline Offline
Junior Poster

Re: Please help

  #19  
May 14th, 2008
Why thank you, your grace. I am your humble servant! Your wish is my command :-)

<URL snipped>
Last edited by peter_budo : May 14th, 2008 at 1:29 pm. Reason: Keep It Spam-Free - Do not spam, advertise, plug your website, or engage in any other type of self promotion.
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 2,884
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 7
Solved Threads: 208
nav33n's Avatar
nav33n nav33n is online now Online
Posting Maven

Re: Please help

  #20  
May 14th, 2008
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MySQL Marketplace
Thread Tools Display Modes

Other Threads in the MySQL Forum

All times are GMT -4. The time now is 12:46 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC