Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

article manager 1.2b-1054-'a.authors_id'


fimilola

Recommended Posts

Hi,

Just installed article manager 1.2b) with spanish translation and it works great admin side but the articles box displays this:

 

1054 - Unknown column 'a.authors_id' in 'on clause'

 

select a.articles_id from articles a, articles_to_topics a2t left join topics_description td on a2t.topics_id = td.topics_id left join authors au on a.authors_id = au.authors_id, articles_description ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '10' and td.language_id = '10' and a.articles_date_added > SUBDATE(now( ), INTERVAL

 

If I take out the a. then it displays ok but each article is multiplied by the number of authors and then i have this message:

 

 

1054 - Unknown column 'a.authors_id' in 'on clause'

 

select count(*) as total from articles a, articles_to_topics a2t left join topics_description td on a2t.topics_id = td.topics_id left join authors au on a.authors_id = au.authors_id, articles_description ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '10' and td.language_id = '10' and a.articles_date_added > SUBDATE(now( ), INTERVAL '30' DAY)

 

 

Since i don't know anything about SQL , can someone help me on this?

 

Thanks

Link to comment
Share on other sites

  • 3 weeks later...
Hi,

Just installed article manager 1.2b) with spanish translation and it works great admin side but the articles box displays this:

 

1054 - Unknown column 'a.authors_id' in 'on clause'

 

select a.articles_id from articles a, articles_to_topics a2t left join topics_description td on a2t.topics_id = td.topics_id left join authors au on a.authors_id = au.authors_id, articles_description ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '10' and td.language_id = '10' and a.articles_date_added > SUBDATE(now( ), INTERVAL

 

If I take out the a. then it displays ok but each article is multiplied by the number of authors and then i have this message:

1054 - Unknown column 'a.authors_id' in 'on clause'

 

select count(*) as total from articles a, articles_to_topics a2t left join topics_description td on a2t.topics_id = td.topics_id left join authors au on a.authors_id = au.authors_id, articles_description ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '10' and td.language_id = '10' and a.articles_date_added > SUBDATE(now( ), INTERVAL '30' DAY)

Since i don't know anything about SQL , can someone help me on this?

 

Thanks

 

I have this problem before when I use mysql v5.0

after that I downgrade into mysql v4.1 everything works fine

I think the problem because the sql format is not compatible with mysql 5.0

 

Cheers,

 

Ricsen

Link to comment
Share on other sites

  • 4 weeks later...
Hi,

Just installed article manager 1.2b) with spanish translation and it works great admin side but the articles box displays this:

 

1054 - Unknown column 'a.authors_id' in 'on clause'

 

select a.articles_id from articles a, articles_to_topics a2t left join topics_description td on a2t.topics_id = td.topics_id left join authors au on a.authors_id = au.authors_id, articles_description ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '10' and td.language_id = '10' and a.articles_date_added > SUBDATE(now( ), INTERVAL

 

If I take out the a. then it displays ok but each article is multiplied by the number of authors and then i have this message:

1054 - Unknown column 'a.authors_id' in 'on clause'

 

select count(*) as total from articles a, articles_to_topics a2t left join topics_description td on a2t.topics_id = td.topics_id left join authors au on a.authors_id = au.authors_id, articles_description ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '10' and td.language_id = '10' and a.articles_date_added > SUBDATE(now( ), INTERVAL '30' DAY)

Since i don't know anything about SQL , can someone help me on this?

 

Thanks

 

I had this problem. I wrapped the FROM statements in () and it works fine now. Something to do with the way the new MySQL 5 functions are prioritized.

 

before - ("select count(*) as total from " . TABLE_TOPICS . " where parent_id =

after - ("select count(*) as total from (" . TABLE_TOPICS . ") where parent_id =

 

HTH

Link to comment
Share on other sites

  • 4 months later...
I had this problem. I wrapped the FROM statements in () and it works fine now. Something to do with the way the new MySQL 5 functions are prioritized.

 

before - ("select count(*) as total from " . TABLE_TOPICS . " where parent_id =

after - ("select count(*) as total from (" . TABLE_TOPICS . ") where parent_id =

 

HTH

 

 

having the same problem as above, but not sure where these statements can be found? are these changes to be made within a php file, or does something have to be changed in SQL through phpMyAdmin? thanks.

Link to comment
Share on other sites

I'm not sure smart on this one, I know MySQL... but I'll try and make a effort to help.

 

Now... the issue is an SQL I know that for a fact, no need for PHP file editing.

 

Can you post up your SQL for the table that the query is in please, thanks.

Installed Contributions: AJAX Menu, AJAX Attributed Manager, AP URL ReWriting, Credit Class and Gift Vouchers, CCGV Report, Date of Birth PullDown, FCKEditor for Product Desc., Monthly Installment Payments, More Pictures 6, MSRP Savings, Must Agree to Terms on Checkout, Order Editor, Payment Method Fee, PopUp Promo, Private Messages, Purchase Order, Purchase Order Application, Secure Admin Login-Logout, STS Plus, SugarCRM Integration, Supertracker, Tax Exempt and Organization Discounts, Your Recent History.

 

23 Total Contributions Installed :)

Link to comment
Share on other sites

baby boy - thanks for the offer to help! however, between this article http://www.oscommerce.com/forums/index.php?showtopic=208286 and similar issues sited in the Article Manager support thread, seems there may be a PHP statement in the file that isn't compatible with newer versions of MySQL.

 

i'd be happy to post the SQL for the table, but unfortunately, my SQL knowledge is zero and i don't know how to do that. :(

Link to comment
Share on other sites

in catalog\includes\boxes\articles.php change these:

 

	  $articles_new_query = tep_db_query("select a.articles_id from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_DESCRIPTION . " ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' and a.articles_date_added > SUBDATE(now( ), INTERVAL '" . NEW_ARTICLES_DAYS_DISPLAY . "' DAY)");

 

to

	  $articles_new_query = tep_db_query("select a.articles_id from " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_ARTICLES . " a on (a.articles_id=a2t.articles_id) left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id left join " . TABLE_ARTICLES_DESCRIPTION . " ad on (a.articles_id=ad.articles_id) where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' and a.articles_date_added > SUBDATE(now( ), INTERVAL '" . NEW_ARTICLES_DAYS_DISPLAY . "' DAY)");

 

further down change:

	  $articles_all_query = tep_db_query("select a.articles_id from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_DESCRIPTION . " ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "'");

 

to

 

	  $articles_all_query = tep_db_query("select a.articles_id from " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_ARTICLES . " a on (a.articles_id=a2t.articles_id) left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id left join " . TABLE_ARTICLES_DESCRIPTION . " ad on (a.articles_id=ad.articles_id) where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "'");

Link to comment
Share on other sites

may have spoke too soon - the solution fixed the errors on the main index.php screen, but now when i click the "Articles" link, i receive the following:

 

1054 - Unknown column 'a.authors_id' in 'on clause'

select count(*) as total from articles a, articles_to_topics a2t left join topics_description td on a2t.topics_id = td.topics_id left join authors au on a.authors_id = au.authors_id, articles_description ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '1' and td.language_id = '1'

[TEP STOP]

 

any ideas? sorry to be a pain. :blush:

Link to comment
Share on other sites

in catalog\articles.php change the following:

 

1. From

		$listing_sql = "select a.articles_id, a.authors_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_name, td.topics_name, a2t.topics_id from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_DESCRIPTION . " ad left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_status = '1' and au.authors_id = '" . (int)$HTTP_GET_VARS['authors_id'] . "' and a.articles_id = a2t.articles_id and ad.articles_id = a2t.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' and a2t.topics_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' order by a.articles_date_added desc, ad.articles_name";

 

to

		$listing_sql = "select a.articles_id, a.authors_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_name, td.topics_name, a2t.topics_id from " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_ARTICLES . " a on (a.articles_id=a2t.articles_id) left join " . TABLE_ARTICLES_DESCRIPTION . " ad on (a.articles_id=ad.articles_id) left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_status = '1' and au.authors_id = '" . (int)$HTTP_GET_VARS['authors_id'] . "' and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' and a2t.topics_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' order by a.articles_date_added desc, ad.articles_name";

 

2. from

		$listing_sql = "select a.articles_id, a.authors_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_name, td.topics_name, a2t.topics_id from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_DESCRIPTION . " ad left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_status = '1' and au.authors_id = '" . (int)$HTTP_GET_VARS['authors_id'] . "' and a.articles_id = a2t.articles_id and ad.articles_id = a2t.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' order by a.articles_date_added desc, ad.articles_name";

 

to:

 

		$listing_sql = "select a.articles_id, a.authors_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_name, td.topics_name, a2t.topics_id from " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_ARTICLES . " a on (a.articles_id=a2t.articles_id) left join " . TABLE_ARTICLES_DESCRIPTION . " ad on (a.articles_id=ad.articles_id) left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_status = '1' and au.authors_id = '" . (int)$HTTP_GET_VARS['authors_id'] . "' and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' order by a.articles_date_added desc, ad.articles_name";

 

3. from

		$listing_sql = "select a.articles_id, a.authors_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_name, td.topics_name, a2t.topics_id from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_DESCRIPTION . " ad left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_status = '1' and a.articles_id = a2t.articles_id and ad.articles_id = a2t.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' and a2t.topics_id = '" . (int)$current_topic_id . "' and au.authors_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' order by a.articles_date_added desc, ad.articles_name";

 

to:

		$listing_sql = "select a.articles_id, a.authors_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_name, td.topics_name, a2t.topics_id from " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_ARTICLES . " a on (a.articles_id=a2t.articles_id) left join " . TABLE_ARTICLES_DESCRIPTION . " ad left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_status = '1' and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' and a2t.topics_id = '" . (int)$current_topic_id . "' and au.authors_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' order by a.articles_date_added desc, ad.articles_name";

 

4. from

		$listing_sql = "select a.articles_id, a.authors_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_name, td.topics_name, a2t.topics_id from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_DESCRIPTION . " ad left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_status = '1' and a.articles_id = a2t.articles_id and ad.articles_id = a2t.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' and a2t.topics_id = '" . (int)$current_topic_id . "' order by a.articles_date_added desc, ad.articles_name";

 

to:

		$listing_sql = "select a.articles_id, a.authors_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_name, td.topics_name, a2t.topics_id from " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_ARTICLES . " a on (a.articles_id=a2t.articles_id) left join " . TABLE_ARTICLES_DESCRIPTION . " ad on (a.articles_id=ad.articles_id) left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_status = '1' and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' and a2t.topics_id = '" . (int)$current_topic_id . "' order by a.articles_date_added desc, ad.articles_name";

 

haven't tested anything so backup your files.

Link to comment
Share on other sites

no idea how you're doing this - wish i could be helping! (feel pretty useless) :'(

 

that worked in that now the topics are showing! still when i drill down to the article level, getting the following error:

 

1054 - Unknown column 'a.authors_id' in 'on clause'

select a.articles_id, a.articles_date_added, a.articles_date_available, a.authors_id, ad.articles_name, ad.articles_description, ad.articles_url, au.authors_name from articles a, articles_description ad left join authors au on a.authors_id = au.authors_id where a.articles_status = '1' and a.articles_id = '2' and ad.articles_id = a.articles_id and ad.language_id = '1'

[TEP STOP]

 

is this something that i can be changing on my own? usually pretty good technically and beginning to feel very dumb.

 

thanks again for the excellent support enigma.

Link to comment
Share on other sites

in catalog\article_info.php change this:

 

	$article_info_query = tep_db_query("select a.articles_id, a.articles_date_added, a.articles_date_available, a.authors_id, ad.articles_name, ad.articles_description, ad.articles_url, au.authors_name from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_DESCRIPTION . " ad left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id where a.articles_status = '1' and a.articles_id = '" . (int)$HTTP_GET_VARS['articles_id'] . "' and ad.articles_id = a.articles_id and ad.language_id = '" . (int)$languages_id . "'");

 

to this:

	$article_info_query = tep_db_query("select a.articles_id, a.articles_date_added, a.articles_date_available, a.authors_id, ad.articles_name, ad.articles_description, ad.articles_url, au.authors_name from " . TABLE_ARTICLES . " a left join " . TABLE_ARTICLES_DESCRIPTION . " ad on (a.articles_id=ad.articles_id) left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id where a.articles_status = '1' and a.articles_id = '" . (int)$HTTP_GET_VARS['articles_id'] . "' and ad.language_id = '" . (int)$languages_id . "'");

Link to comment
Share on other sites

enigma - again, no idea how you did this - but amazing. guess that's why you're the enigma. :D

 

working flawlessly, thanks so much. wish there was some way i could return the favor.

Link to comment
Share on other sites

  • 3 weeks later...

This is in articles_new.php:

$articles_new_query_raw = "select a.articles_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_id, au.authors_name, td.topics_id, td.topics_name from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_DESCRIPTION . " ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' and a.articles_date_added > SUBDATE(now( ), INTERVAL '" . NEW_ARTICLES_DAYS_DISPLAY . "' DAY) order by a.articles_date_added desc, ad.articles_name";

 

I get: 1054 - Unknown column 'a.authors_id' in 'on clause'

 

Can you tell me what I need to change?

 

Thanks,

Philip

Link to comment
Share on other sites

  • 5 weeks later...

Change:

$articles_new_query_raw = "select a.articles_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_id, au.authors_name, td.topics_id, td.topics_name from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_DESCRIPTION . " ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' and a.articles_date_added > SUBDATE(now( ), INTERVAL '" . NEW_ARTICLES_DAYS_DISPLAY . "' DAY) order by a.articles_date_added desc, ad.articles_name";

 

to:

  $articles_new_query_raw = "select a.articles_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_id, au.authors_name, td.topics_id, td.topics_name from " . TABLE_ARTICLES . " a left join " .  TABLE_ARTICLES_TO_TOPICS . " a2t  on (a.articles_id=a2t.articles_id) left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_DESCRIPTION . " ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' and a.articles_date_added > SUBDATE(now( ), INTERVAL '" . NEW_ARTICLES_DAYS_DISPLAY . "' DAY) order by a.articles_date_added desc, ad.articles_name";

 

same mechanics

:D

Desarro de softaware a medida.

 

Desarrollo de módulos osCommerce , Zencart, Virtuemart, etc..

 

http://ZhenIT.com

Link to comment
Share on other sites

  • 10 months later...

I have altered all above codes but still getting this error message

1054 - Unknown column 'a.authors_id' in 'on clause'

 

select count(*) as total from articles a, articles_to_topics a2t left join topics_description td on a2t.topics_id = td.topics_id left join authors au on a.authors_id = au.authors_id, articles_description ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '1' and td.language_id = '1' and a.articles_date_added > SUBDATE(now( ), INTERVAL '365' DAY)

 

Any advices ?

Link to comment
Share on other sites

  • 2 weeks later...

I have followed all of the instructions as outlined in the previous messages. (And thanks very much the detail was great). But unfortunately I am still getting the following message when I open my catalog/articles.php page

 

1054 - Unknown column 'a.authors_id' in 'on clause'

 

select count(*) as total from articles a, articles_to_topics a2t left join topics_description td on a2t.topics_id = td.topics_id left join authors au on a.authors_id = au.authors_id, articles_description ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '1' and td.language_id = '1'

 

[TEP STOP]

 

I am using osCMax which is based on osCommerce but has changed the layout using a different template system. Even compensating for the differences I am getting no where with this contribution. Does anyone have any suggestions for what I can do next? Any help would be greatly appreciated.

Mark

Link to comment
Share on other sites

  • 1 year later...

sorry to bring up a old post but when I installed this conb. I get

 

All Articles

Current Articles

1054 - Unknown column 'a.authors_id' in 'on clause'

 

select count(*) as total from articles a, articles_to_topics a2t left join topics_description td on a2t.topics_id = td.topics_id left join authors au on a.authors_id = au.authors_id, articles_description ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '1' and td.language_id = '1'

 

[TEP STOP]

Link to comment
Share on other sites

  • 4 months later...
sorry to bring up a old post but when I installed this conb. I get

 

All Articles

Current Articles

1054 - Unknown column 'a.authors_id' in 'on clause'

 

select count(*) as total from articles a, articles_to_topics a2t left join topics_description td on a2t.topics_id = td.topics_id left join authors au on a.authors_id = au.authors_id, articles_description ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '1' and td.language_id = '1'

 

[TEP STOP]

 

Look for the queries containing:

from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on

 

and change them into:

from (" . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t) left join " . TABLE_TOPICS_DESCRIPTION . " td on

 

(putting parenthesis after "from" and before "left join" statements).

 

 

MySQL 5.0.15 follows the syntax rules of SQL:2003:

 

<from clause> ::= FROM <table reference list>

<table reference list> ::=

<table reference> [ { <comma> <table reference> }… ]

<table reference> ::=

<table factor>

| <joined table>

<joined table> ::=

<cross join>

| <qualified join>

| <natural join>

Link to comment
Share on other sites

  • 1 year later...
  • 1 month later...

Look for the queries containing:

from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on

 

and change them into:

from (" . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t) left join " . TABLE_TOPICS_DESCRIPTION . " td on

 

(putting parenthesis after "from" and before "left join" statements).

 

 

MySQL 5.0.15 follows the syntax rules of SQL:2003:

 

<from clause> ::= FROM <table reference list>

<table reference list> ::=

<table reference> [ { <comma> <table reference> }… ]

<table reference> ::=

<table factor>

| <joined table>

<joined table> ::=

<cross join>

| <qualified join>

| <natural join>

This works for the New Articles, but what needs to be done for the articles.php which is the All Articles?

 

I find four references in the code for the above and changed them but still get the error message.

Link to comment
Share on other sites

I did the recommended articles.php edit that is suggested in the 7 Aug 2008 fix and now have both articles.php and articles_new.php working.

 

However, I have another problem in regards to subtopics. I am getting a page not found:

Topic-Addictions (http://www.mydomain.com/store/addictions-t-10.html)

Subtopic-Alcohol.

 

When clicking on Alcohol subtopic I am routed to the following URL that says URL not on server.

http://www.mydomain.com/store/addictions-t-10_12.html

 

EDIT-Fixed by adding these RewriteRule in .htaccess

RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-t-([0-9]+_[0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-t-([0-9]+_[0-9]+_[0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}

Edited by newtech
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...