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

#   how I can insert with sql table in hikashop \_field

##

- **[manolo2119](/forum/user/9645-manolo2119 "View manolo2119's Profile")**
- [![manolo2119's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/9645-manolo2119 "View manolo2119's Profile") Topic Author
- [ Offline](/forum/user/9645-manolo2119)

Less More

- Posts: 10
- Thank you received: 0
-
-

13 years 9 months ago [\#86187](#86187) by [manolo2119](/forum/user/9645-manolo2119 "View manolo2119's Profile")  *[how I can insert with sql table in hikashop \_field](/forum/2-general-talk-about-hikashop/77574-how-i-can-insert-with-sql-table-in-hikashop-field#86187 "Hello :blink:  how I can insert with sql table in hikashop &#95;field  I insert from php manager and everything ok.  But from joomla hikashop product, if I modify a product containing imported fields (with SQL). Saving: error: the product is not unique  There are some more related table hikashop&#95;field  thank you very much")* was created by *[manolo2119](/forum/user/9645-manolo2119 "View manolo2119's Profile")*

Hello :blink:

how I can insert with sql table in hikashop _field

I insert from php manager and everything ok.

But from joomla hikashop product, if I modify a product containing imported fields (with SQL). Saving: error: the product is not unique

There are some more related table hikashop_field

thank you very much

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

13 years 9 months ago [\#86192](#86192) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[how I can insert with sql table in hikashop \_field](/forum/2-general-talk-about-hikashop/77574-how-i-can-insert-with-sql-table-in-hikashop-field#86192 "Hello :blink:  how I can insert with sql table in hikashop &#95;field  I insert from php manager and everything ok.  But from joomla hikashop product, if I modify a product containing imported fields (with SQL). Saving: error: the product is not unique  There are some more related table hikashop&#95;field  thank you very much")*

Hi,

I don't understand your message.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

- **[manolo2119](/forum/user/9645-manolo2119 "View manolo2119's Profile")**
- [![manolo2119's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/9645-manolo2119 "View manolo2119's Profile") Topic Author
- [ Offline](/forum/user/9645-manolo2119)

Less More

- Posts: 10
- Thank you received: 0
-
-

13 years 9 months ago [\#86196](#86196) by [manolo2119](/forum/user/9645-manolo2119 "View manolo2119's Profile")  Replied by *[manolo2119](/forum/user/9645-manolo2119 "View manolo2119's Profile")* on topic *[how I can insert with sql table in hikashop \_field](/forum/2-general-talk-about-hikashop/77574-how-i-can-insert-with-sql-table-in-hikashop-field#86196 "Hello :blink:  how I can insert with sql table in hikashop &#95;field  I insert from php manager and everything ok.  But from joomla hikashop product, if I modify a product containing imported fields (with SQL). Saving: error: the product is not unique  There are some more related table hikashop&#95;field  thank you very much")*

sorry, my English is very bad

I need to create 100 custom fields for my products.

The products imported them from csv (OK)

I want to create custom fields from sql script

Ej:

INSERT INTO jo_hikashop_field VALUES (NULL,'product','Pulgadas','televisionpulgadas','checkbox','32::32::0
37::37::0
40::40::0
42::42::0
19::19::0
22::22::0
24::24::0
27::27::0
26::26::0
39::39::0
23::23::0
47::47::0
50::50::0
55::55::0
46::46::0
60::60::0
20::20::0
43::43::0
51::51::0
65::65::',1, 1, 'a:11:{s:12:"errormessage";s:0:"";s:4:"cols";s:0:"";s:9:"filtering";s:1:"1";s:9:"maxlength";s:1:"0";s:4:"rows";s:0:"";s:9:"zone_type";s:7:"country";s:4:"size";s:0:"";s:6:"format";s:0:"";s:5:"allow";s:0:"";s:8:"readonly";s:1:"0";s:15:"limit_to_parent";s:0:"";}', 0, 0, 1, 1, ' ', 1, 'all', ',19,', 0);
Run in mysql admin and all ok

When viewing the product has the custom field (ok)

but if I modify the product, saving me the following error

In Spanish
"Existe al menos un producto con el mismo código
Error al guardar"

Translate google:
At least one product with the same code
Failed to save

Thank

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

- **[manolo2119](/forum/user/9645-manolo2119 "View manolo2119's Profile")**
- [![manolo2119's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/9645-manolo2119 "View manolo2119's Profile") Topic Author
- [ Offline](/forum/user/9645-manolo2119)

Less More

- Posts: 10
- Thank you received: 0
-
-

13 years 9 months ago [\#86197](#86197) by [manolo2119](/forum/user/9645-manolo2119 "View manolo2119's Profile")  Replied by *[manolo2119](/forum/user/9645-manolo2119 "View manolo2119's Profile")* on topic *[how I can insert with sql table in hikashop \_field](/forum/2-general-talk-about-hikashop/77574-how-i-can-insert-with-sql-table-in-hikashop-field#86197 "Hello :blink:  how I can insert with sql table in hikashop &#95;field  I insert from php manager and everything ok.  But from joomla hikashop product, if I modify a product containing imported fields (with SQL). Saving: error: the product is not unique  There are some more related table hikashop&#95;field  thank you very much")*

if I create a custom field from joomla backend, works perfectly.

Then from the exported sql manager mysql this custom field

Delete the custom field from joomla

And I run is exported script before

INSERTINTO&#96;jo_hikashop_field&#96; (&#96;field_id&#96; ,&#96;field_table&#96; ,&#96;field_realname&#96; ,&#96;field_namekey&#96; ,&#96;field_type&#96; ,&#96;field_value&#96; ,&#96;field_published&#96; ,&#96;field_ordering&#96; ,&#96;field_options&#96; ,&#96;field_core&#96; ,&#96;field_required&#96; ,&#96;field_backend&#96; ,&#96;field_frontcomp&#96; ,&#96;field_default&#96; ,&#96;field_backend_listing&#96; ,&#96;field_access&#96; ,&#96;field_categories&#96; ,&#96;field_with_sub_categories&#96;)
VALUES ( 287,'product','Pulgadas','televisionpulgadas','radio','19::19::0\n22::22::0\n23::23::0\n24::24::0\n32::32::0', 1, 2,'a:10:{s:12:"errormessage";s:0:"";s:4:"cols";s:0:"";s:9:"filtering";s:1:"1";s:9:"maxlength";s:1:"0";s:4:"rows";s:0:"";s:9:"zone_type";s:7:"country";s:4:"size";s:0:"";s:6:"format";s:0:"";s:5:"allow";s:0:"";s:8:"readonly";s:1:"0";}', 0, 0, 1, 1,'', 1,'all',',19,', 0)

Then to modify products with this cumston field gives the error

Why?

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

13 years 9 months ago [\#86235](#86235) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[how I can insert with sql table in hikashop \_field](/forum/2-general-talk-about-hikashop/77574-how-i-can-insert-with-sql-table-in-hikashop-field#86235 "Hello :blink:  how I can insert with sql table in hikashop &#95;field  I insert from php manager and everything ok.  But from joomla hikashop product, if I modify a product containing imported fields (with SQL). Saving: error: the product is not unique  There are some more related table hikashop&#95;field  thank you very much")*

Hi,

The best way to create custom fields is to use directly HikaShop.
After that, when you create a custom field, the target table is updated. A new column would be added. So, if you create a custom field but the column is not present, it would generate an error during saving.
Because HikaShop couldn't store in information in a column which does not exists.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc3NTc0LWhvdy1pLWNhbi1pbnNlcnQtd2l0aC1zcWwtdGFibGUtaW4taGlrYXNob3AtZmllbGQ/dG1wbD1tYXJrZG93bg==) 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.149 seconds

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