Skip to content

Critical errror with insert. #201

@sokolx1

Description

@sokolx1

(https://github.com/smi2/phpClickHouse/blob/master/src/Quote/StrictQuoteLine.php) on line 62 you guys use 'implode' function to generate SQL request to database. The trouble is that implode(',', [false, true]) returns ",1" because implode just ignores "false".

The typical consequence of this trouble is that:

$data = [ [
  "archived" => false
  "getter_stats_id" => 59
  "is_discounted" => false
  "is_fbo_visible" => true
  "is_fbs_visible" => true
  "offer_id" => "hrb-0035c001"
  "product_id" => 191868145
  "shop_id" => 2
] ];
$db->InsertAssocBulk($table, $data)

Cannot parse expression of type Bool here: ,56,,1,1,'hrb-0035c001',191868145,2): While executing ValuesBlockInputFormat. (SYNTAX_ERROR) IN:INSERT INTO raw_ozon_products_list (archived,getter_stats_id,is_discounted,is_fbo_visible,is_fbs_visible,offer_id ,product_id,shop_id) VALUES (,56,,1,1,'hrb-0035c001',191868145,2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions