Solved

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

Posted on 2011-09-08
2
183 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

726 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