Please read my post on last page "13 Jul 2014, 10:29 PM"
When I try to run sql came with Ty track module I get error column count does not match row count.....
I have post two numinix sqls which I have already installed and was told they have added new column so that's why I need to rearrange Ty track sql to go through.
So I had reviewed the sql from the page before, but there was nothing in that sql that modified the configuration table. The change probably then occurs in the program code.
That said, as long as one or both of those modules are instlled, you are likely to continue to have "this problem". In correcting this issue for the two previous installations there should be enough information to reproduce the same type of solution. Compare the original file(s) to what was provided and reproduce the same solution.
T this point I would not consider this an issue of not knowing sql as two examples have been provided to do the same thing, both performed/incorporated the same solution and accomplished the same task. I am not trying to be mean or disrespectful. There just simply is enough available to learn/identify the small changes necessary as a result of installing one or both of the Numinix modules and the corrections made to install the other two modules.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
I am trying to learn how to build sql.
I just ran following sql and it did created all tables/values in database but in ZC admin I see Captcha but when I click on it, on next page it does not show any options.
SELECT @sortorder:=max(sort_order)
FROM configuration_group;
INSERT INTO `configuration_group` VALUES (NULL, 'CAPTCHA Validation', 'Anti-Robot Registration/Verification', @sortorder+1, 1);
SELECT @captchaid:=max(configuration_group_id)
FROM configuration_group;
INSERT INTO admin_pages ( page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order ) VALUES ( 'configCaptchaValidation', 'BOX_CONFIGURATION_CAPTCHA_VALIDATION', 'FILENAME_CONFIGURATION', 'gID=31', 'configuration', 'Y', '26');
INSERT INTO configuration ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Activate Validation', 'ACCOUNT_VALIDATION', 'true', 'Enables CAPTCHA Verification Code. This is used to verify that the customer is real and valid, rather than a bot or spider session.', @captchaid, 10, NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),' );
INSERT INTO configuration ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Activate Validation on Create Account page', 'CREATE_ACCOUNT_VALIDATION', 'true', 'Enables verification on Create Account page. (Recommended)', @captchaid, 20, NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),' );
INSERT INTO configuration ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Activate Validation on Contact Us page', 'CONTACT_US_VALIDATION', 'true', 'Enables verification on Contact Us page. (Optional)', @captchaid, 30, NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),' );
INSERT INTO configuration ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Activate Validation on Tell a Friend page', 'TELL_A_FRIEND_VALIDATION', 'true', 'Enables verification on Tell a Friend page. (Recommended)', @captchaid, 40, NULL, 'zen_cfg_select_option(array(\'true\', \'false\'),' );
INSERT INTO configuration ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function ) VALUES ( 'Length of Validation Code', 'ENTRY_VALIDATION_LENGTH', '7', 'Default Length = 7, Maximum Length = 32', @captchaid, 50, NULL, NULL );
DROP TABLE IF EXISTS anti_robotreg;
CREATE TABLE anti_robotreg (session_id char(32) DEFAULT '' NOT NULL, reg_key char(32) NOT NULL, timestamp int(11) unsigned NOT NULL, PRIMARY KEY (session_id));
on domain.com/admin/configuration.php?gID=88
Title Value Action
but if I change 88 to 92
domain.com/admin/configuration.php?gID=92
Then all options for Captcha will show so it looks like id for Configuration_group and configuration is not matching when running sql.
How I can fix this so sql install goes correctly for future. For now I have manually edit table and match ids to 88 and its looks ok now.
So first thing, need to learn how to post code on this site. The code should begin with a tag (like html) such as [ CO D E ] but without any spaces and can be generated by pressing the # button on the toolbar of this editor.
Next, the reason for the difference is because in 95% of the code re assigning values based on database generated information, but in the below line of code, there is a straight assignment, which may not match what the database is creating. Because the value of gId=31 is a string plus the value that is autogenerated, and because this command is in sql, you need to "concatenate" (join two pieces of information) together. Mysql uses concat(a,b) to join two pieces together, and more can be added on so concat(a,b,c) would join three pieces together, etc. So in your case you would want to change:
To:Code:INSERT INTO admin_pages ( page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order ) VALUES ( 'configCaptchaValidation', 'BOX_CONFIGURATION_CAPTCHA_VALIDATION', 'FILENAME_CONFIGURATION', 'gID=31', 'configuration', 'Y', '26');
Code:INSERT INTO admin_pages ( page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order ) VALUES ( 'configCaptchaValidation', 'BOX_CONFIGURATION_CAPTCHA_VALIDATION', 'FILENAME_CONFIGURATION', CONCAT('gID=', @captchaid), 'configuration', 'Y', '26');
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
So... Difficult for me to say that it was "wrong" other than it didn't work. Also, it was more of an issue of mixing processes. If going to go automatic, do it all the way. Otherwise assign the values specifically and risk getting mixtures of things.
The sort order information for the most part is a "formality" it gives the data a sequence, not typically a specific function. Ie, easier on the reader to understand the data, and perhaps the "importance" of what is presented. Worst case. There is that new items get intersperced with other data.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
How I can make this
$sql = $db->bindVars($sql, ':customersName', $customer->fields['customers_nick']. ' - ' .$customer->fields['customers_firstname'] . ' ' . substr( $customer->fields['customers_lastname'], 0, 1) . '.', 'string');
so either customer name or nick name appear on product review? Right now I have both appear - between.
I want to make it to show only nick name of customer or their name when they do not have set any nick name.
Thank you.
Bookmarks