a74bustud Posted August 1, 2003 Posted August 1, 2003 I'm running into an error when running the sql file that is supplied. This is what I get: SQL-query : INSERT INTO configuration( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, date_added ) VALUES ( 'Latest News', 'MAX_DISPLAY_LATEST_NEWS', 3, 'maximum number of items to display in the Latest News box', 3, NOW( ) ) MySQL said: Table 'custompc_news.configuration' doesn't exist I looked at the file and I noticed that there is only one CREATE TABLE. I have no idea what I'm doing in sql so any help would be appreciated, thanks! Quote
wizardsandwars Posted August 1, 2003 Posted August 1, 2003 Is your 'configuration' table in your database intact? Quote ------------------------------------------------------------------------------------------------------------------------- NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit. If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.
a74bustud Posted August 1, 2003 Author Posted August 1, 2003 There is no configuration table. This is what is supplied with the contrib: # $Id: latest_news.sql,v 1.3 2002/11/11 06:24:04 will Exp $ # Create the table to hold the latest news. CREATE TABLE latest_news ( news_id int(11) DEFAULT '0' NOT NULL auto_increment, headline varchar(255) NOT NULL, content text NOT NULL, date_added datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, status tinyint(1) DEFAULT '0' NOT NULL, PRIMARY KEY (news_id) ); # Insert some test data INSERT INTO latest_news ( headline, content, date_added, status ) VALUES ( 'Latest News v1.1.0', 'If you can see this message, you have successfully installed the 'Latest News' contribution for osCommerce. Visit the administration area to remove this news item and add your own!', now(), 1 ); # Insert configuration items into the configuration table. INSERT INTO configuration ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, date_added ) VALUES ( 'Latest News', 'MAX_DISPLAY_LATEST_NEWS', 3, 'maximum number of items to display in the Latest News box', 3, NOW() ); Remember, I'm an idiot :D Quote
wizardsandwars Posted August 1, 2003 Posted August 1, 2003 In the SQL that you pasted, for the contribution that you are trying to install, there is a "INSERT" statement attempting to insert records into the 'configuration' table in your database. MySQL is telling you that you don't have a configuration table. You need to look into your database at all of the tables, and see if you see a configuation table. You can do this with a tool called phpmyadmin Quote ------------------------------------------------------------------------------------------------------------------------- NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit. If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.
a74bustud Posted August 1, 2003 Author Posted August 1, 2003 That's the thing. There is no configuration table. This contrib is going into a clean database. The sql file provided doesn't creat a configuration table. I know I need to make a table and there's where I'm having trouble. I have no idea how the table should go. Quote
Guest Posted August 1, 2003 Posted August 1, 2003 In order to install the contrib, you have to install OSC (and its database!) first. Hth, Matt Quote
a74bustud Posted August 1, 2003 Author Posted August 1, 2003 There's the answer I was looking for. I forgot I had to add the sql file to the OSC database! I was creating a new database for it, d'oh! Thanks everyone! :D Quote
azer Posted November 9, 2003 Posted November 9, 2003 (edited) latest_news.sql,v 1.3 is it compatible with MS1 ? thansk in advance Edited November 9, 2003 by azer Quote MS2
bmw000 Posted October 13, 2007 Posted October 13, 2007 I have this contribution installed. It works great except it is only showing me the 3 latest news items. Even though I have 5 ticked to be shown. Please help. Thanks, Brian Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.