Forums / Upgrading to 1.5.x / many ���� appears

many ���� appears

Started by jsarwar on 11 Jul 2014, 4:56 PM · Views: 7,344

Results 61 to 69 of 69
16 Jul 2014, 2:30 AM
#61
yaritai avatar

yaritai

Zen Follower

Join Date:
Apr 2014
Posts:
154
Plugin Contributions:
0

many ���� appears

jsarwar:

Thank you. Can you please rearrange sql for me I posted above for TY track as I can't understand sql and how to put them together.

What exactly are you trying to do with rearranging the sql file?

16 Jul 2014, 10:12 AM
#62
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: many ���� appears

yaritai:

What exactly are you trying to do with rearranging the sql file?

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.

16 Jul 2014, 10:59 AM
#63
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: many ���� appears

jsarwar:

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...

16 Jul 2014, 10:13 PM
#64
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: many ���� appears

mc12345678:

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.

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.

16 Jul 2014, 10:37 PM
#65
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: many ���� appears

jsarwar:

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:

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');

To:

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...

16 Jul 2014, 10:41 PM
#66
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: many ���� appears

mc12345678:

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:

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');

> 
> To:
> ```
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');

Thank you for info. Before I ran sql I did check data base and set

'gID=88', 'configuration', 'Y', '1982');
as these were next available numbers for id and sort order. So this was not right way to do?

16 Jul 2014, 11:01 PM
#67
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: many ���� appears

jsarwar:

Thank you for info. Before I ran sql I did check data base and set

'gID=88', 'configuration', 'Y', '1982');
as these were next available numbers for id and sort order. So this was not right way to do?

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...

16 Jul 2014, 11:04 PM
#68
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: many ���� appears

mc12345678:

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.

Thank you for explanation.
Is there any module for these? I have search but find none.

Customer upload profile image.

Show number of units sold on product page or number of Members using this product.

20 Jul 2014, 6:22 PM
#69
jsarwar avatar

jsarwar

Zen Follower

Join Date:
Jul 2012
Posts:
347
Plugin Contributions:
0

Re: many ���� appears

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.