Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Download feature


Mikeweb

Recommended Posts

Posted

Thanks "The Bear",

 

all is ok!

 

But I desire that the download is active after I have verified the payment.

 

Do you know that it is possible?

 

Thanks again for your help

Mikeweb

Posted
1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'limit 0, 20' at line 1

 

select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from orders o left join orders_total ot on (o.orders_id = ot.orders_id), orders_status s where o.orders_status = s.orders_status_id and s.language_id = '4' and ot.class = 'ot_total' order by limit 0, 20

 

[TEP STOP]

 

I receive this error in the Client/Orders of the admin section and it si not possible for me to process any order.

 

The contribution is the 994.

 

Thanks for any help

Mikeweb

Posted
1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'limit 0, 20' at line 1

 

select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from orders o left join orders_total ot on (o.orders_id = ot.orders_id), orders_status s where o.orders_status = s.orders_status_id and s.language_id = '4' and ot.class = 'ot_total' order by limit 0, 20

 

[TEP STOP]

 

I receive this error in the Client/Orders of the admin section and it si not possible for me to process any order.

 

The contribution is the 994.

 

Thanks for any help

I tried that contribution too and that is what I get as well...

Posted

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select p.products_id, pd.products_name, p.products_image, p.pro

 

select count(select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join products_description pd on p.products_id = pd.products_id and pd.language_id = \'1\' left join specials s on p.products_id = s.products_id where p.products_status = \'1\' order by p.products_date_added DESC, pd.products_name) as total

 

[TEP STOP]

 

 

I receive this error after I log in and click the link that asks if I want to see the new products. (products_new.php) Can anyone help me as to why?

 

Thanks in advance.

aspeciality AT hotmail DOT com

  • 4 months later...
Posted

cw3849

did you ever get a solution to your problem??? I am having the same error, down to the very letter.

Teresa

Posted

Hi all,

I did get the 1064 to go away in a two step process and I will explain.

Problem area was this (products_new.php):

 

$products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' " . $sql_add_code . " order by p.products_date_added DESC, pd.products_name";

 

To get rid of the 1064 I did this:

Find this below the above code:

//$products_new_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_PRODUCTS_NEW, $products_new_query_raw, $products_new_numrows);

 

comment it out ( I never erase stuff just in case I need to go back to the old stuff) and put this instead:

$products_new_split = new splitPageResults($products_new_query_raw, MAX_DISPLAY_PRODUCTS_NEW);

 

Okay now that in itself made my 1064 go away however, for me, it brought up some other code error (can't remember the number, but I do remember the fix).

For me, I was missing a comma just before my IF statement see below:

 

$products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' " . $sql_add_code . " order by p.products_date_added DESC, pd.products_name";

 

 

this should be:

 

$products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' " . $sql_add_code . " order by p.products_date_added DESC, pd.products_name";

 

 

So hopefully one or both of these fixes will help.

Teresa

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...