mike-h30 wrote on Monday, February 18, 2008:
I am getting the below error when I log into OpenEMR. I am the only user getting this error. I am puzzled because I gave myself all rights in GACL and the other users have limited rights. I tracked down the code that creates the error message (authorizations.php) and I placed it below. I am not sure of the logic behind this. It appears this stems from the “see_auth” field in table Patient_Data. I noticed all the other users have “see_auth” = 2 and for my user id I have “see_auth” = ‘3’. The choices in the new user screen are ‘None’ (see_auth = 1), ‘Only Mine’(see_auth = 2), and ‘All’(see_auth = 3). Why is it that when see authorizations is set to ‘ALL’ (see_auth = 3 ), I get the error - even though I have all rights in GACL? I also noticed that when I set “see_auth = ‘1’” there is no error.
ERROR: query failed: select lname from users where id = (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 ‘’ at line 1)
Mike Test
Authorize
/****
//Michael A Rowley MD 20041012.
// added below 4 lines to add provider to authorizations for ez reference.
$providerID = sqlFetchArray(sqlStatement(
“select providerID from patient_data where pid=$ppid”));
$userID=$providerID{“providerID”};
$providerName = sqlFetchArray(sqlStatement(
“select lname from users where id=$userID”));
****/
// Don’t use sqlQuery because there might be no match.
$providerName = sqlFetchArray(sqlStatement(
"select lname from users where id = " . $name[‘providerID’]));
Regards,
-Mike
/****/