MySQL treating a constant as a column

Swany

New member
I am attempting to limit the selections of a table in a lookup to the current user entries using the where field (nl_id_user = ‘dadabik_var current_user dadabik_var’) in the forms configurator.
I get this error:

[08] Error: during query execution. SELECT `nl_id`, `nl_title` FROM `Newsletters` WHERE (1 = 1) AND (nl_id_user = ‘root’)
The DBMS server said: SQLSTATE[42S22]: Column not found: 1054 Unknown column '‘root’' in 'where clause'

Not sure if this is a bug.

Should I be doing something else to obtain the desired results?
 

Swany

New member
Added the server info

Dadabik version 10
Apache Version 2.4.51
PHP Version 7.2.34
MySQL Version 10.3.31-MariaDB-cll-lve
Architecture x86_64
Operating System linux
Browser Safari
 

Martin68

Well-known member
I am not shire if I understood your database structure ... perhaps you can post the two table names an columns here?

Kind regards

Martin
 

eugenio

Administrator
Staff member
I think you are just using the wrong quote character, you are using ‘ instead of '.

Anyway, probably, as an alternative, it's easier to use the ownership permissions.

Best,
 
Top