插入mysql数据

时间:2016-12-01 11:40:20

标签: php

如果我的数据是这样的,我将如何使用php插入mysql?

array(
    [template] => template2
    [quote] => 001
    [date] => 01 December 2016
    [referenceno] => 
    [q_cust_name] => 0
    [q_cat_name] => Array
        (
            [0] => drugs
            [1] => oil
        )

    [p_name] => Array
        (
            [0] => Paracetamol
            [1] => liquid nitrogen
        )

    [quot_per_unit] => Array
        (
            [0] => 600/gram
            [1] => 500/liter
        )

    [quot_des] => Array
        (
            [0] => Cures fever. Use only in case of high fever
            [1] => Hazardous Product.
        )

    [quot_price] => Array
        (
            [0] => 150.00
            [1] => 7500.00
        )

    [quot_req_qty] => Array
        (
            [0] => 10
            [1] => 10
        )

  )

1 个答案:

答案 0 :(得分:0)

$ x =“INSERT INTO quotation user_idquotedatereferencenoq_cust_nameq_cat_namep_namequot_per_unitquot_req_qtyquot_pricequot_disquot_desincident_chargetax,{ {1}},quote_total)VALUES“;

status