Jump to content
Sign in to follow this  
ppungin

Запрос к SQL

Recommended Posts

Подскажите пожалуйста, какой запрос сделать в базе данных:

Таблица "oc_product"

Товары только со значением "isbn" = 888

Добавить в этих товарах в поле "product_stickers" значение a:1:{i:0;s:1:"1";}

 

Заранее спасибо за ответ!

Share this post


Link to post
Share on other sites

UPDATE oc_product SET product_stickers = 'a:1:{i:0;s:1:"1";}' WHERE isbn = 888;

Share this post


Link to post
Share on other sites

n3bo, Спасибо большое, получилось! А то весь мозг сломал, пытался экспортом-импортом, база ошибку выдавала.

Share this post


Link to post
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
You are posting as a guest. If you have an account, please sign in.
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.

Sign in to follow this  

  • Similar Content

    • By ljcnfkb
      сайт формирует запрос на удаление(DELETE) SEO-URL, но после него не формирует запрос вида INSERT: sendto(7, "5\0\0\0\3DELETE FROM oc_seo_url WHERE query = 'product_id=51'", 57, MSG_DONTWAIT, NULL, 0) = 57 poll([{fd=7, events=POLLIN|POLLERR|POLLHUP}], 1, 1471228928) = 1 ([{fd=7, revents=POLLIN}]) recvfrom(7, "\7\0\0\1\0\0\0\2\0\0\0", 4754, MSG_DONTWAIT, NULL, NULL) = 11 sendto(7, "9\0\0\0\3DELETE FROM oc_product_to_layout WHERE product_id = '51'", 61, MSG_DONTWAIT, NULL, 0) = 61 poll([{fd=7, events=POLLIN|POLLERR|POLLHUP}], 1, 1471228928) = 1 ([{fd=7, revents=POLLIN}])
      Другая информация успешно обновляется через DELETE -> INSERT, например: sendto(7, "M\0\0\0\3DELETE FROM oc_product_related WHERE product_id = '83' AND related_id = '51'", 81, MSG_DONTWAIT, NULL, 0) = 81 poll([{fd=7, events=POLLIN|POLLERR|POLLHUP}], 1, 1471228928) = 1 ([{fd=7, revents=POLLIN}]) recvfrom(7, "\7\0\0\1\0\0\0\2\0\0\0", 4787, MSG_DONTWAIT, NULL, NULL) = 11 sendto(7, "H\0\0\0\3INSERT INTO oc_product_related SET product_id = '83', related_id = '51'", 76, MSG_DONTWAIT, NULL, 0) = 76 poll([{fd=7, events=POLLIN|POLLERR|POLLHUP}], 1, 1471228928) = 1 ([{fd=7, revents=POLLIN}])
  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.