Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

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!

Posted

Is your 'configuration' table in your database intact?

-------------------------------------------------------------------------------------------------------------------------

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.

Posted

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

Posted

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

-------------------------------------------------------------------------------------------------------------------------

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.

Posted

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.

Posted

In order to install the contrib, you have to install OSC (and its database!) first.

 

Hth,

Matt

Posted

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

  • 3 months later...
Posted (edited)
latest_news.sql,v 1.3

 

is it compatible with MS1 ?

 

thansk in advance

Edited by azer

MS2

  • 3 years later...
Posted

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...