• * 註冊
  • * 登入
  • * 問答集
  • 討論區首頁
討論區首頁 ‹ 威博達-電子商務 ‹ 購物車 ‹ osCommerce 購物車討論
網站公告

此區提供使用者討論平台,如您有使用上的問題或管理心得請盡請提出,都將會由專人跟客戶一同解決問題與分享。本公司官方網頁因更換討論區主機,造成異動,為了維護使用者的資料與權益,如您無法登入請至註冊中心重新註冊會員,謝謝。

購物車後台出現1064的錯誤訊息 

OSC 2.3.x / 3.0.x 購物車軟體討論。
發表回覆
5 篇文章 • 第 1 頁 (共 1 頁)

購物車後台出現1064的錯誤訊息

文章由 joe » 2005年 9月 6日, 13:44

若您的購物車後台出現
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 '-20, 20' at line 1

select c.customers_firstname, c.customers_lastname, sum(op.products_quantity * op.final_price) as ordersum from customers c, orders_products op, orders o where c.customers_id = o.customers_id and o.orders_id = op.orders_id group by c.customers_firstname, c.customers_lastname order by ordersum DESC limit -20, 20

[TEP STOP]


解決的方法請參考
http://meta.homeunix.com/modules.php?op=modload&name=phpbb2&file=viewtopic.php&p=22
或是
http://www.oscommerce.com/community/bugs,1605/category,Database%2B%28General%29

這各問題通常發生在BIG5版本的OSC在MYSQL4.1的環境,基本上4.0的MYSQL不會出現這過狀況

米塔創意坊文章內容如下
一、編輯 /includes/classes/split_page_results.php
找
sql_query .= " limit " . $offset . ", " .
$this->number_of_rows_per_page;
(約在66行)
在上面插入if($offset <0 ) $offset = 0;
(所以是插在66行)

變成
$offset = ($this->number_of_rows_per_page * ($this->current_page_number - 1));
if ($offset < 0) $offset = 0;
$this->sql_query .= " limit " . $offset . ", " . $this->number_of_rows_per_page;

二、同樣的方法編輯
admin//includes/classes/split_page_results.php
找sql_query .= " limit " . $offset . ", " .
(約在38行)
一樣在上面插入if($offset <0 ) $offset = 0;
(所以是插在38行)

變成
$offset = ($max_rows_per_page *
($current_page_number - 1));
if ($offset < 0) $offset = 0;
$sql_query .= " limit " . $offset . ", " .
$max_rows_per_page;
威博達網路科技有限公司
http://webdsn.net
威博達網域註冊中心
http://webdsn.com.tw
給您完全的網路解決方案
電話:04-8967167
MSN:t3313@hotmail.com
SKYPE:joe3313
joe
Junior Member
 
文章: 446
註冊時間: 2004年 6月 10日, 20:00
性別:
回頂端

更改無效

文章由 herchen » 2005年 9月 28日, 09:55

小弟依照指示修改您所說的二個檔案,其結果仍然一樣出現1064的錯誤訊息 :confused:
herchen
Junior Member
 
文章: 3
註冊時間: 2005年 7月 10日, 16:34
性別:
回頂端

文章由 joe » 2005年 9月 28日, 16:00

herchen 寫:小弟依照指示修改您所說的二個檔案,其結果仍然一樣出現1064的錯誤訊息 :confused:

我試過了多可以才公佈出來的,KMD網站上回報也多可以,應該是您改錯了
若您是我們的客戶,請將您的網域給我們,服務人員會替您修改,並提供必要的帳號密碼EMAIL給服務人員
若您是本公司客戶請盡量利用MSN與服務人員聯絡
威博達網路科技有限公司
http://webdsn.net
威博達網域註冊中心
http://webdsn.com.tw
給您完全的網路解決方案
電話:04-8967167
MSN:t3313@hotmail.com
SKYPE:joe3313
joe
Junior Member
 
文章: 446
註冊時間: 2004年 6月 10日, 20:00
性別:
回頂端

請幫忙解決問題

文章由 herchen » 2005年 9月 29日, 09:23

您好:我是貴公司客戶,我的網址是http://no1pig.com,請代為修改,感謝貴公司體帖的服務 :)
herchen
Junior Member
 
文章: 3
註冊時間: 2005年 7月 10日, 16:34
性別:
回頂端

文章由 joe » 2005年 9月 29日, 10:10

herchen 寫:您好:我是貴公司客戶,我的網址是http://no1pig.com,請代為修改,感謝貴公司體帖的服務 :)

請MAIL您的FTP帳號密碼及購物車帳號密碼給服務服務人員
service@webdsn.net
威博達網路科技有限公司
http://webdsn.net
威博達網域註冊中心
http://webdsn.com.tw
給您完全的網路解決方案
電話:04-8967167
MSN:t3313@hotmail.com
SKYPE:joe3313
joe
Junior Member
 
文章: 446
註冊時間: 2004年 6月 10日, 20:00
性別:
回頂端


發表回覆
5 篇文章 • 第 1 頁 (共 1 頁)

回到 osCommerce 購物車討論

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 0 位訪客

  • 變更字體大小
  • 列印模式
Powered by phpBB® Forum Software © phpBB Group
Style created by David Jansen @ IDLaunch
正體中文語系由 竹貓星球 維護製作
Time : 0.121s | 17 Queries | GZIP : Off