如何在mysql对象中写入where条件

问题描述

在表 A 中,我有一列类似于 options 的值如下所示。

{
    "info_buyRequest": {
        "qty": "1.0000"       
    },"options": [       
        {
            "label": "Prescription","value": "|power_base:-2.00|bc_base:8.9|dia_base:14.2|qty:1","print_value": "|power_base:-2.00|bc_base:8.9|dia_base:14.2|qty:1","option_id": "403","option_type": "field","option_value": "|power_base:-2.00|bc_base:8.9|dia_base:14.2|qty:1","custom_view": false
        }
    ]
}

我有一个包含 power_codebc_codedia_code 等列的表 B。 我必须将表 b 列与表 A 对象 power_base,bc_base,dia_base 进行比较。

或者 PHP 是否可行?

创建表语句。

CREATE TABLE `sales_order_item` (
  `item_id` int(10) UNSIGNED NOT NULL COMMENT 'Item ID',`order_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Order ID',`parent_item_id` int(10) UNSIGNED DEFAULT NULL COMMENT 'Parent Item ID',`quote_item_id` int(10) UNSIGNED DEFAULT NULL COMMENT 'Quote Item ID',`store_id` smallint(5) UNSIGNED DEFAULT NULL COMMENT 'Store ID',`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',`product_id` int(10) UNSIGNED DEFAULT NULL COMMENT 'Product ID',`product_type` varchar(255) DEFAULT NULL COMMENT 'Product Type',`product_options` text COMMENT 'Product Options',`weight` decimal(12,4) DEFAULT '0.0000' COMMENT 'Weight',`is_virtual` smallint(5) UNSIGNED DEFAULT NULL COMMENT 'Is Virtual',`sku` varchar(255) DEFAULT NULL COMMENT 'Sku',`name` varchar(255) DEFAULT NULL COMMENT 'Name',`description` text COMMENT 'Description',`applied_rule_ids` text COMMENT 'Applied Rule Ids',`additional_data` text COMMENT 'Additional Data',`is_qty_decimal` smallint(5) UNSIGNED DEFAULT NULL COMMENT 'Is Qty Decimal',`no_discount` smallint(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'No discount',`qty_backordered` decimal(12,4) DEFAULT '0.0000' COMMENT 'Qty Backordered',`qty_canceled` decimal(12,4) DEFAULT '0.0000' COMMENT 'Qty Canceled',`qty_invoiced` decimal(12,4) DEFAULT '0.0000' COMMENT 'Qty Invoiced',`qty_ordered` decimal(12,4) DEFAULT '0.0000' COMMENT 'Qty Ordered',`qty_refunded` decimal(12,4) DEFAULT '0.0000' COMMENT 'Qty refunded',`qty_shipped` decimal(12,4) DEFAULT '0.0000' COMMENT 'Qty Shipped',`base_cost` decimal(12,4) DEFAULT '0.0000' COMMENT 'Base Cost',`price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Price',`base_price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Price',`original_price` decimal(12,4) DEFAULT NULL COMMENT 'Original Price',`base_original_price` decimal(12,4) DEFAULT NULL COMMENT 'Base Original Price',`tax_percent` decimal(12,4) DEFAULT '0.0000' COMMENT 'Tax Percent',`tax_amount` decimal(20,4) DEFAULT '0.0000' COMMENT 'Tax Amount',`base_tax_amount` decimal(20,4) DEFAULT '0.0000' COMMENT 'Base Tax Amount',`tax_invoiced` decimal(20,4) DEFAULT '0.0000' COMMENT 'Tax Invoiced',`base_tax_invoiced` decimal(20,4) DEFAULT '0.0000' COMMENT 'Base Tax Invoiced',`discount_percent` decimal(12,4) DEFAULT '0.0000' COMMENT 'discount Percent',`discount_amount` decimal(20,4) DEFAULT '0.0000' COMMENT 'discount Amount',`base_discount_amount` decimal(20,4) DEFAULT '0.0000' COMMENT 'Base discount Amount',`discount_invoiced` decimal(20,4) DEFAULT '0.0000' COMMENT 'discount Invoiced',`base_discount_invoiced` decimal(20,4) DEFAULT '0.0000' COMMENT 'Base discount Invoiced',`amount_refunded` decimal(20,4) DEFAULT '0.0000' COMMENT 'Amount refunded',`base_amount_refunded` decimal(20,4) DEFAULT '0.0000' COMMENT 'Base Amount refunded',`row_total` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Row Total',`base_row_total` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Row Total',`row_invoiced` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Row Invoiced',`base_row_invoiced` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Row Invoiced',`row_weight` decimal(12,4) DEFAULT '0.0000' COMMENT 'Row Weight',`base_tax_before_discount` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Before discount',`tax_before_discount` decimal(20,4) DEFAULT NULL COMMENT 'Tax Before discount',`ext_order_item_id` varchar(255) DEFAULT NULL COMMENT 'Ext Order Item ID',`price_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Price Incl Tax',`base_price_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Price Incl Tax',`row_total_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Row Total Incl Tax',`base_row_total_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Row Total Incl Tax',`discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'discount Tax Compensation Amount',`base_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base discount Tax Compensation Amount',`discount_tax_compensation_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'discount Tax Compensation Invoiced',`base_discount_tax_compensation_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base discount Tax Compensation Invoiced',`discount_tax_compensation_refunded` decimal(20,4) DEFAULT NULL COMMENT 'discount Tax Compensation refunded',`base_discount_tax_compensation_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base discount Tax Compensation refunded',`tax_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Tax Canceled',`discount_tax_compensation_canceled` decimal(20,4) DEFAULT NULL COMMENT 'discount Tax Compensation Canceled',`tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Tax refunded',`base_tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax refunded',`discount_refunded` decimal(20,4) DEFAULT NULL COMMENT 'discount refunded',`base_discount_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base discount refunded',`gift_message_id` int(11) DEFAULT NULL COMMENT 'Gift Message ID',`gift_message_available` int(11) DEFAULT NULL COMMENT 'Gift Message Available',`free_shipping` smallint(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Free Shipping',`weee_tax_applied` text COMMENT 'Weee Tax Applied',`weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Amount',`weee_tax_applied_row_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Row Amount',`weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax disposition',`weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Row disposition',`base_weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Amount',`base_weee_tax_applied_row_amnt` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Row Amnt',`base_weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax disposition',`base_weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Row disposition',) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Sales Order Item';

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...