[Skip to main content](#vessel-content)

#   Error while creating order via backend

##

- **[Labas](/forum/user/39243-labas "View Labas's Profile")**
- [![Labas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar39243.jpg)](/forum/user/39243-labas "View Labas's Profile") Topic Author
- [ Offline](/forum/user/39243-labas)

Less More

- Posts: 37
- Thank you received: 0
-
-
-

8 years 10 months ago [\#285092](#285092) by [Labas](/forum/user/39243-labas "View Labas's Profile")  *[Error while creating order via backend](/forum/35-orders-management/893292-error-while-creating-order-via-backend#285092 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.3 -- PHP version -- : 7 -- Browser(s) name and version -- : firefox -- Error-message(debug-mod must be tuned on) -- : 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 '' at line 1  When i want to add orded via backend i get error as in error message.  Anybody had the same?  Regards Wojciech")* was created by *[Labas](/forum/user/39243-labas "View Labas's Profile")*

-- HikaShop version -- : 3.2.1
-- Joomla version -- : 3.8.3
-- PHP version -- : 7
-- Browser(s) name and version -- : firefox
-- Error-message(debug-mod must be tuned on) -- : 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 '' at line 1

When i want to add orded via backend i get error as in error message.

Anybody had the same?

Regards
Wojciech

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5MzI5Mi1lcnJvci13aGlsZS1jcmVhdGluZy1vcmRlci12aWEtYmFja2VuZD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86326
- Thank you received: 14288
-
-

8 years 10 months ago [\#285095](#285095) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Error while creating order via backend](/forum/35-orders-management/893292-error-while-creating-order-via-backend#285095 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.3 -- PHP version -- : 7 -- Browser(s) name and version -- : firefox -- Error-message(debug-mod must be tuned on) -- : 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 '' at line 1  When i want to add orded via backend i get error as in error message.  Anybody had the same?  Regards Wojciech")*

Hi,

Please do that change in order to have the MySQL query which creates the error:
[ www.hikashop.com/forum/install-update/89...-version.html#277684](https://www.hikashop.com/forum/install-update/891805-confusing-info-about-hikashop-version.html#277684)
Then provide the MySQL query so that we have a better grasp of the situation.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5MzI5Mi1lcnJvci13aGlsZS1jcmVhdGluZy1vcmRlci12aWEtYmFja2VuZD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Labas](/forum/user/39243-labas "View Labas's Profile")**
- [![Labas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar39243.jpg)](/forum/user/39243-labas "View Labas's Profile") Topic Author
- [ Offline](/forum/user/39243-labas)

Less More

- Posts: 37
- Thank you received: 0
-
-
-

8 years 10 months ago [\#285119](#285119) by [Labas](/forum/user/39243-labas "View Labas's Profile")  Replied by *[Labas](/forum/user/39243-labas "View Labas's Profile")* on topic *[Error while creating order via backend](/forum/35-orders-management/893292-error-while-creating-order-via-backend#285119 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.3 -- PHP version -- : 7 -- Browser(s) name and version -- : firefox -- Error-message(debug-mod must be tuned on) -- : 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 '' at line 1  When i want to add orded via backend i get error as in error message.  Anybody had the same?  Regards Wojciech")*

Hello,
After that changes, in message i have:

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 '' at line 1 select user_email from e6uxm_hikashop_user where user_id =

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5MzI5Mi1lcnJvci13aGlsZS1jcmVhdGluZy1vcmRlci12aWEtYmFja2VuZD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86326
- Thank you received: 14288
-
-

8 years 10 months ago [\#285123](#285123) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Error while creating order via backend](/forum/35-orders-management/893292-error-while-creating-order-via-backend#285123 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.3 -- PHP version -- : 7 -- Browser(s) name and version -- : firefox -- Error-message(debug-mod must be tuned on) -- : 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 '' at line 1  When i want to add orded via backend i get error as in error message.  Anybody had the same?  Regards Wojciech")*

Hi,

As far as I can see there is no such query in HikaShop.

Just before the line : Code:

parent::__construct($message."\r\n".$query, $code, $previous);

in that libraries/joomla/database/exception/executing.php file, add temporarily the code: Code:

var_dump(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)); exit;

That way, when the query fails, it will display the stack of PHP calls.
That will allow us to tell you where that MySQL query comes from.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5MzI5Mi1lcnJvci13aGlsZS1jcmVhdGluZy1vcmRlci12aWEtYmFja2VuZD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Labas](/forum/user/39243-labas "View Labas's Profile")**
- [![Labas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar39243.jpg)](/forum/user/39243-labas "View Labas's Profile") Topic Author
- [ Offline](/forum/user/39243-labas)

Less More

- Posts: 37
- Thank you received: 0
-
-
-

8 years 10 months ago [\#285138](#285138) by [Labas](/forum/user/39243-labas "View Labas's Profile")  Replied by *[Labas](/forum/user/39243-labas "View Labas's Profile")* on topic *[Error while creating order via backend](/forum/35-orders-management/893292-error-while-creating-order-via-backend#285138 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.3 -- PHP version -- : 7 -- Browser(s) name and version -- : firefox -- Error-message(debug-mod must be tuned on) -- : 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 '' at line 1  When i want to add orded via backend i get error as in error message.  Anybody had the same?  Regards Wojciech")*

Code:

array(16) { [0]=&gt; array(5) { ["file"]=&gt; string(76) "/home/users/domyslne/public_html/libraries/joomla/database/driver/mysqli.php" ["line"]=&gt; int(650) ["function"]=&gt; string(11) "__construct" ["class"]=&gt; string(27) "JDatabaseExceptionExecuting" ["type"]=&gt; string(2) "-&gt;" } [1]=&gt; array(5) { ["file"]=&gt; string(69) "/home/users/domyslne/public_html/libraries/joomla/database/driver.php" ["line"]=&gt; int(1730) ["function"]=&gt; string(7) "execute" ["class"]=&gt; string(21) "JDatabaseDriverMysqli" ["type"]=&gt; string(2) "-&gt;" } [2]=&gt; array(5) { ["file"]=&gt; string(83) "/home/users/domyslne/public_html/plugins/hikashopshipping/paczkomaty/paczkomaty.php" ["line"]=&gt; int(19) ["function"]=&gt; string(10) "loadResult" ["class"]=&gt; string(15) "JDatabaseDriver" ["type"]=&gt; string(2) "-&gt;" } [3]=&gt; array(5) { ["file"]=&gt; string(65) "/home/users/domyslne/public_html/libraries/joomla/event/event.php" ["line"]=&gt; int(70) ["function"]=&gt; string(19) "onBeforeOrderCreate" ["class"]=&gt; string(29) "plgHikaShopshippingPaczkomaty" ["type"]=&gt; string(2) "-&gt;" } [4]=&gt; array(5) { ["file"]=&gt; string(70) "/home/users/domyslne/public_html/libraries/joomla/event/dispatcher.php" ["line"]=&gt; int(160) ["function"]=&gt; string(6) "update" ["class"]=&gt; string(6) "JEvent" ["type"]=&gt; string(2) "-&gt;" } [5]=&gt; array(5) { ["file"]=&gt; string(88) "/home/users/domyslne/public_html/administrator/components/com_hikashop/classes/order.php" ["line"]=&gt; int(167) ["function"]=&gt; string(7) "trigger" ["class"]=&gt; string(16) "JEventDispatcher" ["type"]=&gt; string(2) "-&gt;" } [6]=&gt; array(5) { ["file"]=&gt; string(92) "/home/users/domyslne/public_html/administrator/components/com_hikashop/controllers/order.php" ["line"]=&gt; int(51) ["function"]=&gt; string(4) "save" ["class"]=&gt; string(18) "hikashopOrderClass" ["type"]=&gt; string(2) "-&gt;" } [7]=&gt; array(5) { ["file"]=&gt; string(80) "/home/users/domyslne/public_html/libraries/src/MVC/Controller/BaseController.php" ["line"]=&gt; int(710) ["function"]=&gt; string(8) "neworder" ["class"]=&gt; string(15) "OrderController" ["type"]=&gt; string(2) "-&gt;" } [8]=&gt; array(5) { ["file"]=&gt; string(89) "/home/users/domyslne/public_html/administrator/components/com_hikashop/helpers/helper.php" ["line"]=&gt; int(1837) ["function"]=&gt; string(7) "execute" ["class"]=&gt; string(40) "Joomla\CMS\MVC\Controller\BaseController" ["type"]=&gt; string(2) "-&gt;" } [9]=&gt; array(5) { ["file"]=&gt; string(83) "/home/users/domyslne/public_html/administrator/components/com_hikashop/hikashop.php" ["line"]=&gt; int(71) ["function"]=&gt; string(7) "execute" ["class"]=&gt; string(18) "hikashopController" ["type"]=&gt; string(2) "-&gt;" } [10]=&gt; array(4) { ["file"]=&gt; string(76) "/home/users/domyslne/public_html/libraries/src/Component/ComponentHelper.php" ["line"]=&gt; int(381) ["args"]=&gt; array(1) { [0]=&gt; string(83) "/home/users/domyslne/public_html/administrator/components/com_hikashop/hikashop.php" } ["function"]=&gt; string(12) "require_once" } [11]=&gt; array(5) { ["file"]=&gt; string(76) "/home/users/domyslne/public_html/libraries/src/Component/ComponentHelper.php" ["line"]=&gt; int(356) ["function"]=&gt; string(16) "executeComponent" ["class"]=&gt; string(36) "Joomla\CMS\Component\ComponentHelper" ["type"]=&gt; string(2) "::" } [12]=&gt; array(5) { ["file"]=&gt; string(87) "/home/users/domyslne/public_html/libraries/src/Application/AdministratorApplication.php" ["line"]=&gt; int(101) ["function"]=&gt; string(15) "renderComponent" ["class"]=&gt; string(36) "Joomla\CMS\Component\ComponentHelper" ["type"]=&gt; string(2) "::" } [13]=&gt; array(5) { ["file"]=&gt; string(87) "/home/users/domyslne/public_html/libraries/src/Application/AdministratorApplication.php" ["line"]=&gt; int(159) ["function"]=&gt; string(8) "dispatch" ["class"]=&gt; string(47) "Joomla\CMS\Application\AdministratorApplication" ["type"]=&gt; string(2) "-&gt;" } [14]=&gt; array(5) { ["file"]=&gt; string(77) "/home/users/domyslne/public_html/libraries/src/Application/CMSApplication.php" ["line"]=&gt; int(267) ["function"]=&gt; string(9) "doExecute" ["class"]=&gt; string(47) "Joomla\CMS\Application\AdministratorApplication" ["type"]=&gt; string(2) "-&gt;" } [15]=&gt; array(5) { ["file"]=&gt; string(56) "/home/users/domyslne/public_html/administrator/index.php" ["line"]=&gt; int(51) ["function"]=&gt; string(7) "execute" ["class"]=&gt; string(37) "Joomla\CMS\Application\CMSApplication" ["type"]=&gt; string(2) "-&gt;" } }

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5MzI5Mi1lcnJvci13aGlsZS1jcmVhdGluZy1vcmRlci12aWEtYmFja2VuZD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86326
- Thank you received: 14288
-
-

8 years 10 months ago [\#285139](#285139) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Error while creating order via backend](/forum/35-orders-management/893292-error-while-creating-order-via-backend#285139 "-- HikaShop version -- : 3.2.1 -- Joomla version -- : 3.8.3 -- PHP version -- : 7 -- Browser(s) name and version -- : firefox -- Error-message(debug-mod must be tuned on) -- : 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 '' at line 1  When i want to add orded via backend i get error as in error message.  Anybody had the same?  Regards Wojciech")*

Hi,

Thanks.
As expected, that error doesn't come from HikaShop.
It comes from a shipping plugin called "paczkomaty" that you're using. That shipping plugin is doing that MySQL query.
I suppose that the developer of that plugin didn't expect that the order_id of an order could be empty (when the order is being created).
The query is located just before line 19 of the file /plugins/hikashopshipping/paczkomaty/paczkomaty.php

The following user(s) said Thank You: [Labas](/forum/user/39243-labas "View Labas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg5MzI5Mi1lcnJvci13aGlsZS1jcmVhdGluZy1vcmRlci12aWEtYmFja2VuZD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.072 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
