I just updated an old installation and now I get the following creating or listing encounters.
ERROR: query failed: select formdir, user, form_name, form_id, deleted from forms where encounter = ‘6’ and pid=‘1’ ORDER BY FIND_IN_SET(formdir,‘vitals’) DESC, date DESC
Error: Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation ‘find_in_set’
That error is coming from MySQL, through OpenEMR. Unfortunately I don’t know how to fix it off the top of my head. I can tell you that you need to correct the ‘collations’ in MySQL.
OpenEMR uses the utf8_unicode_ci collation. Perhaps your database is set to latin1_swedish_ci as a default?
I found and noted the fix for this back in Nov. I hope it is being fixed in the CVS, which I as a Windows guy know NOTHING about. The fix has nothing to do with the language - it is one of those software error mis-directs because computers are ignorant. The fix was (and still is)
Found cause of issue from 11/9/08; in openemr\library\forms.inc near line 43 needs // ahead of $sql .="ORDER BY FIND_IN_SET… " there are too many arguments for the next statement otherwise. This might want to be revised in the future if the listed order is not workable, but for now leave as adjusted to simply comment.
Thanks for that it saved me from a full upgrade. As it turns out it is a mysql 4.x with php4x. That compiled version of Mysql did not support utf8_unicode_ci (or so it complained when I tried to activate it). But this seems to be the fix. I have other installs with MySQL5x and PHP5x but this error doesnt show up. I wonder if anyone has the why to that.
I still cannot fathom how that works on a non-windows system?! Too many arguments is exactly that. That it ONLY seems to show up on the Windows install is suspicious at the least. But since I made that fix we have had ZERO similar occurrences.
Jason; Any chance of your guys who DO know this stuff can look at that specific case and address that? Thanks.
I believe that ajperezcrespo hit the nail on the head a few posts back. He was getting the error with MySQL v4 without support for the utf8_unicode_ci collation.
His MySQL v5 installations were working just fine. This might be because the newer versions of MySQL support unicode by default.