Solved

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

Posted on 2011-09-08
2
179 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
Comment Utility
l_bg_img,

Try after removing the ",".

SS
0
 

Author Comment

by:msvarts
Comment Utility
Guru? You are a genius!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

771 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

10 Experts available now in Live!

Get 1:1 Help Now