Advertisement
Guest User

Untitled

a guest
May 27th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 2.36 KB | None | 0 0
  1. INSERT INTO `usp_product_to_category` (`product_id`, `category_id`) VALUES ((SELECT product_id FROM usp_product WHERE sku = 'sku'),(SELECT category_id FROM usp_category_description WHERE name = 'Subcategory'))
  2.  
  3.  
  4.  
  5. INSERT INTO `usp_product_to_category` (`product_id`, `category_id`) VALUES ((SELECT product_id FROM usp_product WHERE sku = 'sku'),(SELECT category_id FROM usp_category_description WHERE name = 'Topcategory'))
  6.  
  7.  
  8.  
  9. *************************** 1. row ***************************
  10.   Field: category_id
  11.    Type: int(11)
  12.    Null: NO
  13.     Key: PRI
  14. Default: NULL
  15.   Extra: auto_increment
  16. *************************** 2. row ***************************
  17.   Field: image
  18.    Type: varchar(255)
  19.    Null: YES
  20.     Key:
  21. Default: NULL
  22.   Extra:
  23. *************************** 3. row ***************************
  24.   Field: parent_id
  25.    Type: int(11)
  26.    Null: NO
  27.     Key:
  28. Default: 0
  29.   Extra:
  30. *************************** 4. row ***************************
  31.   Field: sort_order
  32.    Type: int(3)
  33.    Null: NO
  34.     Key:
  35. Default: 0
  36.   Extra:
  37. *************************** 5. row ***************************
  38.   Field: date_added
  39.    Type: datetime
  40.    Null: NO
  41.     Key:
  42. Default: 0000-00-00 00:00:00
  43.   Extra:
  44. *************************** 6. row ***************************
  45.   Field: date_modified
  46.    Type: datetime
  47.    Null: NO
  48.     Key:
  49. Default: 0000-00-00 00:00:00
  50.   Extra:
  51. *************************** 7. row ***************************
  52.   Field: status
  53.    Type: int(1)
  54.    Null: NO
  55.     Key:
  56. Default: 1
  57.   Extra:
  58. 7 rows in set (0.00 sec)
  59.  
  60.  
  61.  
  62. describe usp_category_description \G;
  63. *************************** 1. row ***************************
  64.   Field: category_id
  65.    Type: int(11)
  66.    Null: NO
  67.     Key: PRI
  68. Default: NULL
  69.   Extra:
  70. *************************** 2. row ***************************
  71.   Field: language_id
  72.    Type: int(11)
  73.    Null: NO
  74.     Key: PRI
  75. Default: NULL
  76.   Extra:
  77. *************************** 3. row ***************************
  78.   Field: name
  79.    Type: varchar(32)
  80.    Null: NO
  81.     Key: MUL
  82. Default:
  83.   Extra:
  84. *************************** 4. row ***************************
  85.   Field: meta_description
  86.    Type: varchar(255)
  87.    Null: NO
  88.     Key:
  89. Default: NULL
  90.   Extra:
  91. *************************** 5. row ***************************
  92.   Field: description
  93.    Type: text
  94.    Null: NO
  95.     Key:
  96. Default: NULL
  97.   Extra:
  98. 5 rows in set (0.00 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement