Solved

Setup.php not sets up tables but fails to enter default data?

Posted on 2011-09-08
2
180 Views
Last Modified: 2012-05-12
I have a setup file that sets up tables, but when I use the code below to try to enter the default data, I get an error:

"Error: Column count doesn't match value count at row 1"

- - - - - - - - - - - - - - -
mysql_query("INSERT INTO themes (
title,
layout,
m_color_show,
m_color,
m_img,
s_color_show,
s_color,
s_img,
s_img_repeat,
p_color_show,
p_color,
p_img,
p_img_repeat,
f_color_show,
f_color,
f_fontcolor,
f_img,
h_color,
h_face,
h_size,
b_color,
b_face,
b_size,
l_color_show,
l_off,
l_over,
l_bg_off,
l_bg_over,
l_bg_option,
l_bg_img,
)
VALUES (
'ZenBinder Default',
'1',
'no',
'#000000',
'mast_lwc_digitalmedia.gif',
'yes',
'#ECECEC',
'hacker_bg_page.jpg',
'repeat-x',
'no',
'#ECECEC',
'hacker_bg_page_50.png',
'repeat-y',
'no',
'#855B25',
'#000000',
'hacker_bg_footer_50.png',
'#2F2A30',
'Helvetica, Arial, sans-serif',
'18pt',
'#782F14',
'Tahoma, serifSansSerifMonospace',
'10pt',
'yes',
'#000000',
'#FFFFFF',
'#D9D9D9',
'#57534F',
'no',
'none'
)");
- - - - - - - - - - - - - - -
0
Comment
Question by:msvarts
2 Comments
 
LVL 9

Accepted Solution

by:
sshah254 earned 500 total points
ID: 36508138
l_bg_img,

Try after removing the ",".

SS
0
 

Author Comment

by:msvarts
ID: 36508235
Guru? You are a genius!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now