<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Search function in 2.4.2]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=6932&amp;type=atom" />
	<updated>2017-08-21T07:51:38Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=6932</id>
		<entry>
			<title type="html"><![CDATA[Re: Search function in 2.4.2]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28462#p28462" />
			<content type="html"><![CDATA[<p>Hi - I will test it at the end of the week.</p>]]></content>
			<author>
				<name><![CDATA[spott]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=383</uri>
			</author>
			<updated>2017-08-21T07:51:38Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28462#p28462</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Search function in 2.4.2]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28457#p28457" />
			<content type="html"><![CDATA[<p>It appears that your session vale for the collation is specifically <strong>utf8mb4_unicode_ci</strong> which is different from the others.</p><p>You can test it in a local XAMPP first and see if the issue persists.</p><p>I have no issue with the standard <strong>en_US-demo.sql</strong> on XAMPP. You too can try the standard en_US demo CoA as a plain vanilla install (not an upgrade) and see if the issue persists. If it goes away, then compare your db schemas to see what gives.</p><p>If all else fails, PM me a link to your DB backup sans pwds/txns and the specific build of FA you are using and I will test it out in a sandbox. That way we can check if it is a php script issue or a MySQL db issue.</p><p>State the versions of PHP, MySQL, Apache, OS platform.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-08-21T03:06:48Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28457#p28457</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Search function in 2.4.2]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28453#p28453" />
			<content type="html"><![CDATA[<p>Nothing - I cleared cache, even tried incognito with browser.<br />Variables - I don&#039;t have ssh access to server, but phpMyAdmin shows that:<br /><a href="https://www.upload.ee/image/7368594/database.png">[img]https://www.upload.ee/thumb/7368594/database.png[/img]</a></p>]]></content>
			<author>
				<name><![CDATA[spott]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=383</uri>
			</author>
			<updated>2017-08-20T13:47:05Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28453#p28453</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Search function in 2.4.2]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28452#p28452" />
			<content type="html"><![CDATA[<p>Check the output of:<br /></p><div class="codebox"><pre><code>SHOW VARIABLES LIKE &quot;%collation%&quot;;</code></pre></div><p>Clear the company/#/js_cache/*/*.js files, logout, clear browser cache and login again after closing all browser instances.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-08-20T12:11:00Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28452#p28452</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Search function in 2.4.2]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28450#p28450" />
			<content type="html"><![CDATA[<p>Hi<br />I added this line to includes/db/connect_db_mysqli.inc - it looks now so:<br />$db = mysqli_connect($connection[&quot;host&quot;], $connection[&quot;dbuser&quot;], $connection[&quot;dbpassword&quot;], &quot;&quot;, <br />&nbsp; &nbsp; &nbsp; &nbsp; !empty($connection[&quot;port&quot;]) ? $connection[&quot;port&quot;] : 3306); // default port in mysql is 3306<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; mysqli_select_db($db, $connection[&quot;dbname&quot;]);<br />&nbsp; &nbsp; ///// From mysqli release 5.6.6 the sql_mode is no longer empty as it was prior to<br />&nbsp; &nbsp; ///// this release. Just for safety we make it empty for all 5.6 release and higher.<br />&nbsp; &nbsp; ///// This non empty sql_mode values can interphere with FA, so all is set empty during<br />&nbsp; &nbsp; ///// our sessions.<br />&nbsp; &nbsp; ///// We are, however, investigating the existing code to be compatible in the future.<br />&nbsp; &nbsp; db_query(&quot;SET sql_mode = &#039;&quot;.SQL_MODE.&quot;&#039;&quot;);<br />&nbsp; &nbsp; /////added fix<br />&nbsp; &nbsp; db_query(&quot;SET @@collation_connection = @@collation_database&quot;);<br />&nbsp; &nbsp; /////<br />&nbsp; &nbsp; $SysPrefs-&gt;refresh();<br />&nbsp; &nbsp; return $db;</p><p>But it doesn&#039;t help. Or I need something to change in customers_db.inc file also?<br />Collation - in config_db.php and also in database - all tables are utf8_unicode_ci</p>]]></content>
			<author>
				<name><![CDATA[spott]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=383</uri>
			</author>
			<updated>2017-08-20T12:00:48Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28450#p28450</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Search function in 2.4.2]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28449#p28449" />
			<content type="html"><![CDATA[<p>If we want the &quot;LIKE&quot; parameter to be <strong>case-insensitive</strong> then the <a href="https://stackoverflow.com/questions/18853452/sql-select-like-insensitive-casing">database collation should be <strong>utf8_general_ci</strong></a>. Otherwise if the db and connection collations are different, we will need to set the comparables in the LIKE statement to be &quot;LOWER(field1) LIKE CONCAT(&quot;%&quot;,@cmpstr,&quot;%&quot;)&quot; in places like <strong>function get_customers_search()</strong> in <strong>sales/includes/db/customers_db.inc</strong> or cast / convert the collations on a per sql basis.</p><p>The real workaround:</p><p>After the last <em>db_query()</em> in the <strong>function set_global_connection()</strong> in <strong>includes/db/connect_db_mysqli.inc</strong>, add the following:<br /></p><div class="codebox"><pre><code>    db_query(&quot;SET @@collation_connection = @@collation_database&quot;);</code></pre></div><p>The above will help avoid &quot;Illegal mix of collations&quot; error by synching the connection collation to that of the database and make for case-insensitive searching. It will also benefit those in a single db environment on a shared hosting platform with possibly different collations for each application - YMMV.</p><p>It is possible that the collation of the customer name may have been of a different collation as well - check your CoA and db schema!</p><p>@joe: can we commit this - after all the db collation should dictate such usage.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-08-20T11:11:19Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28449#p28449</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Search function in 2.4.2]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28445#p28445" />
			<content type="html"><![CDATA[<p>Hi<br />I today upgraded from 2.3.26 to 2.4.2. And one thing, what I discovered - customer search is broken - ok - its not broken, but it has lost one very important thing - Most of my customers and suppliers names beginning with uppercase letter - some of them are all uppercase in name. In 2.3 version - in search - there was no problem with search - I can write in lowercase beginning of the name and it finds it. Example - Netikink - for searching I need to write only - neti and thats fine. Now in 2.4 search doesn&#039;t search any more uppercase/lowercase letters together. So when I am searching now neti - it gives me nothing. I need to write Neti - and then it finds it.</p><p>Is it possible to fix it?</p><p>EDIT: Item search and supplier search working as needed - there is no problem with uppercase/lowecase. So the problem is only in customer part - when searching customers.</p>]]></content>
			<author>
				<name><![CDATA[spott]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=383</uri>
			</author>
			<updated>2017-08-20T07:54:56Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28445#p28445</id>
		</entry>
</feed>
