SQL Error

premkumarcv wrote on Saturday, July 29, 2006:

I get this error after installation in localhost…

Unknown column ‘a.pc_aid’ in ‘on clause’

When i login as admin, the above error appears.

Help needed.

drbowen wrote on Sunday, July 30, 2006:

Dear Prem Kumar,

This question has come up a number of time in the forums before.  You might start by running a search on these forums using:

Unknown column ‘a.pc_aid’ in ‘on clause’

There are six pages of results.

If I remember correctly this has to do with the calendar section and has to do with a quirk in one of the operating systems.  The last post that seems to have fixed this was:

"""
Changing from "FROM $table AS a, $cattable AS b" 
to "FROM ($table a, $cattable b)" in the file pnuserapi.php did fix the issue. Thanks for the help. It is greatly appreciated. Keep up the good work!!!
"""

We need to know your operating system, operating system version, OEMR version, PHP version, MySQL version.

I’m not sure but I think this may be dur using MySQL 5 when OEMR version 2.8.1 still requires MySQL 4+.

Again I quote from the prior conversations:

"""
This is a Sql 2003 compliance error with MsSql 5.0 being more strict than 4. Simply change the query in \openemr\interface\main\calendar\
modules\PostCalendar\pnuserapi.php

to FROM $table AS a, $cattable AS b

to FROM ($table a, $cattable b)

this worked for me

jkoch
"""

I hope this helps.

Sam Bowen