Error when using physical Form

markthepharaoh wrote on Tuesday, June 09, 2015:

Hello everyone,

Any idea how to fix this error? thanks.

ERROR: insert failed: INSERT INTO form_physical_exam ( forms_id, line_id, wnl, abn, diagnosis, comments ) VALUES ( ‘20847’, ‘OTHER’, ‘1’, ‘0’, ‘’, ‘12 LEADS EKG: NSR, PAC’S, NO OTHER CHANGES, COMPARED TO PREVIOUS ONE’ )

Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘S, NO OTHER CHANGES, COMPARED TO PREVIOUS ONE’ )’ at line 1

C:\xampp\htdocs\openemr\interface\forms\physical_exam\new.php at 104:sqlInsert

blankev wrote on Tuesday, June 09, 2015:

Strange!!! In Demo latest 4.2.(7) it works as should with no comments or errors. In my local version it works, without comments or errors.

Did you do the right steps? Register => Install DB => Click on => Disabled and it will show as Enabled. Include the correct name under Category => Click Update.

Very important to have the correct versions working together. This goes for the normal installation. If you work with different systems there might be different problems.

But probably this worked in your version too! When inserting comments there might be a syntax error when you inserted in Edit or comment.

If it is inserted into the form goto Database, Open Form_Physical examination and delete line with the syntax error info.

The word PAC’S might give this error Chnage into something like PAC-s and see if this solves the problem.

blankev wrote on Tuesday, June 09, 2015:

See also my latest edits of my comment.

mdsupport wrote on Tuesday, June 09, 2015:

The problem is caused by the single-quote character in your comments (PAC’S).

It is a bug because the developer probably did not use current standards. Until that is fixed by someone, try to use PAC’S. No guarantee the problem will not surface somewhere else.