Got a question, not sure if its what I'm trying to do or something in the code but I'm getting a blank attribute id..
So, history..
ZC1.5.6c
PHP7.3.11
DBIO 1.6.1 from ZC download
Each product gets three file download attributes.
Error log:
[07-Apr-2020 07:02:45 America/Phoenix] Request URI: /ADMIN/dbio_manager.php?action=file, IP address: 0.0.0.0
#1 trigger_error() called at [/************/cbgshop/includes/classes/db/mysql/query_factory.php:171]
#2 queryFactory->show_error() called at [/***********/cbgshop/includes/classes/db/mysql/query_factory.php:143]
#3 queryFactory->set_error() called at [/************/cbgshop/includes/classes/db/mysql/query_factory.php:270]
#4 queryFactory->Execute() called at [ADMIN/includes/classes/dbio/DbIoProductsAttribsRawHandler.php:333]
#5 DbIoProductsAttribsRawHandler->importBuildSqlQuery() called at [ADMIN/includes/classes/dbio/DbIoHandler.php:937]
#6 DbIoHandler->importCsvRecord() called at [ADMIN/includes/classes/dbio/DbIo.php:265]
#7 DbIo->dbioImport() called at [ADMIN/dbio_manager.php:240]
--> PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LIMIT 1' at line 4 :: SELECT *
FROM zen_products_attributes_download
WHERE products_attributes_id =
LIMIT 1 ==> (as called by) ADMIN/includes/classes/dbio/DbIoProductsAttribsRawHandler.php on line 333 <== in /*********/cbgshop/includes/classes/db/mysql/query_factory.php on line 171.
part of the attribute csv file.. 49 products, 3 each for 149 attributes..
v_products_attributes_id,v_products_id,v_products_model,v_manufacturers_name,v_options_id,v_products_options_name,v_options_values_id,v_products_options_values_name,v_options_values_price,v_price_prefix,v_products_options_sort_order,v_product_attribute_is_free,v_products_attributes_weight,v_products_attributes_weight_prefix,v_attributes_display_only,v_attributes_default,v_attributes_discounted,v_attributes_image,v_attributes_price_base_included,v_attributes_price_onetime,v_attributes_price_factor,v_attributes_price_factor_offset,v_attributes_price_factor_onetime,v_attributes_price_factor_onetime_offset,v_attributes_qty_prices,v_attributes_qty_prices_onetime,v_attributes_price_words,v_attributes_price_words_free,v_attributes_price_letters,v_attributes_price_letters_free,v_attributes_required,v_products_attributes_filename,v_products_attributes_maxdays,v_products_attributes_maxcount,v_dbio_command
107,78,Q1149,,13,Topo-NIAP,29,NAIP Quad,1,+,2,1,0,+,0,0,1,maps/NAIP_DIAMOND_POINT.jpg,1,0,0,0,0,0,,,0,0,0,0,0,NAIP_DIAMOND POINT.pdf,7,1,
108,78,Q1149,,13,Topo-NIAP,28,Topo Quad,0,+,1,1,0,+,0,1,1,maps/Quad_DIAMOND_POINT.jpg,1,0,0,0,0,0,,,0,0,0,0,1,Quad_DIAMOND POINT.pdf,7,1,
124,78,Q1149,,13,Topo-NIAP,30,Both Quads,4.65,+,3,1,0,+,0,0,1,maps/Both_DIAMOND_POINT.jpg,1,0,0,0,0,0,,,0,0,0,0,0,Both_DIAMOND_POINT.zip,7,1,
110,80,Q0149,,13,Topo-NIAP,29,NAIP Quad,1,+,2,1,0,+,0,0,1,maps/NAIP_STRAWBERRY.jpg,1,0,0,0,0,0,,,0,0,0,0,0,NAIP_STRAWBERRY.pdf,7,1,
111,80,Q0149,,13,Topo-NIAP,28,Topo Quad,0,+,1,1,0,+,0,1,1,maps/Quad_STRAWBERRY.jpg,1,0,0,0,0,0,,,0,0,0,0,1,Quad_STRAWBERRY.pdf,7,1,
125,80,Q0149,,13,Topo-NIAP,30,Both Quads,4.65,+,3,1,0,+,0,0,1,maps/Both_STRAWBERRY.jpg,1,0,0,0,0,0,,,0,0,0,0,0,Both_STRAWBERRY.zip,7,1,
From some debugging I see that line 324 of DbioProductsAttribsRawHandler.php is creating a empty attribute id
die('attributes id is: ' . $products_attributes_id . ' -2- ' . $table_fields['products_attributes_id']['value'] . ' -3- ' . $this->key_fields['products_attributes_id']);
I was thinking of doing one attribute at a time and see what happens..