Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Critical errror with insert. #201

Open
sokolx1 opened this issue Dec 8, 2023 · 3 comments
Open

Critical errror with insert. #201

sokolx1 opened this issue Dec 8, 2023 · 3 comments

Comments

@sokolx1
Copy link

sokolx1 commented Dec 8, 2023

(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)

@MakarMS
Copy link

MakarMS commented Jan 10, 2024

Hi, I am facing a similar problem. Waiting for my pull request to be approved MakarMS@c8c9006

@MakarMS
Copy link

MakarMS commented Jan 16, 2024

A fix has been made

@isublimity
Copy link
Contributor

Can I close this task?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants