Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Latest News Contrib table mess


Deskdirect

Recommended Posts

I created a table as instructed

# $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)

);

 

Now this error appears

 

1146 - Table 'mitchryder.TABLE_LATEST_NEWS' doesn't exist

 

select news_id, headline, content, status from TABLE_LATEST_NEWS order by date_added desc

 

[TEP STOP]

 

If I change the title of the table to TABLE_LATEST_NEWS I don't get the error but the path to save and view the news doesn't exist and all I get is no page found.

 

:?:

Link to comment
Share on other sites

Annette;

 

I don't know if this solves your whole problem, but the name of the table in your example should be "latest_news" rather than "table_latest_news"

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

Linda,

 

No I didn't but only because there were no instructions to do so. I've been trying to follow the install instruction because I don't know enough about what I'm doing to venture out on my own.

 

I think I can define the new table in application_top.php - I'll give it a shot.

 

Thanks.

Link to comment
Share on other sites

If I change the title of the table to TABLE_LATEST_NEWS I don't get the error but the path to save and view the news doesn't exist and all I get is no page found.

Argh?? Did you fully read the file INSTALL.txt in the package?

 

You are using v1.1.0 (the $Id$ header from the SQL file tells me so ?

 

I'll just grab that revision out of CVS so that I can have a look ? Yup, you forgot to add the define for the table to the correct files. From the first third of the INSTALL.txt file:

##############################################################################

##

## INSTRUCTIONS:

##  - ***TURN WORD WRAP OFF TO VIEW THIS FILE***

##  - while installing, please make sure that you include the comments that

##    are provided -- they make it easier for an uninstall / upgrade later!!

##  - with additions, indent till it looks like it fits. Indenting has been

##    removed in this readme to make it easier to read.

##  - some lines are more than 80 characters long. Please make sure that you

##    search for these as one line





####[ OPEN ]##################################################################



 catalog /includes/application_top.php



####[ FIND, 83-85 ]###########################################################



 define('FILENAME_SPECIALS', 'specials.php');

 define('FILENAME_TELL_A_FRIEND', 'tell_a_friend.php');

 define('FILENAME_UPCOMING_PRODUCTS', 'upcoming_products.php');



####[ AFTER, ADD ]############################################################



 /* BEGIN latest news

    - added 'define' statement below */

 define('FILENAME_LATEST_NEWS', 'latest_news.php');

 /* //END latest news */

 

####[ FIND, 134-137 ]#########################################################



 define('TABLE_ZONES_TO_GEO_ZONES', 'zones_to_geo_zones');

 define('TABLE_WHOS_ONLINE', 'whos_online');

 define('TABLE_ZONES', 'zones');



####[ AFTER, ADD ]############################################################



 /* BEGIN latest news

    - added 'define' statement below */

 define('TABLE_LATEST_NEWS', 'latest_news');

 /* //END latest news */

And there are instructions further down in the file for adding the defines in the administration module.

 

HTH

Link to comment
Share on other sites

Thanks, Latest News is working perfectly. And again I apologize.

Nice to know its working. No need to really apologise. I forgot to add the <sarcasm></sarcasm> tags around that last post of mine ?

 

I keep on saying that a new version of LN is coming, but it keeps on not coming. I am having a little difficulty getting my head around the multi-lingual code. :(

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...