I am a rookie at PHP and I am using some existing code. The author of the code suggested to me:
// My lines
$_cp_sql .= " SET SESSION "."my.tech"." = :my_current_user";
$res_prepare = prepare_db($conn, $_cp_sql);
$res_bind = bind_param_db($res_prepare, ':my_current_user' , $current_user );
$res_ex = execute_prepared_db($res_prepare,0);
Note: prepare_db and all the other functions_db are PDO functions that the author created to be compatible with MYSQL, Postgres, and SQLITE.
My case is Postgres. However the execute produces this error, and after days of reading, I still do not understand why. What am I doing wrong?
The DBMS server said: SQLSTATE[42601]: Syntax error: 7
ERROR: syntax error at or near "$1" LINE 1: SET SESSION my.tech = $1 ^