Editor php SQL Server DB table name created by another DB user
Editor php SQL Server DB table name created by another DB user

Hi,
I use SQL Server and almost all the tables are made by dbo while this one table is made by user "admin" with table name "users". So I normally do "select * from admin.users" to get data, but when I try this in Editor php, I get below error..
SQLSTATE[42S02]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid object name 'admin.users'.
Here's the code:
Editor::inst($db, 'admin.users')
->fields(
Field::inst('ID'),
Field::inst('PW'),
Field::inst('name'),
Field::inst('branch'),
Field::inst('Type')
)
->process($_POST)
->json();
How could I solve this issue...?:S Please help
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
When your user
admin
created the table, did it go into a different schema? (I'm guessing it went into anadmin
schema?Or does, the user you are connecting to the database with in PHP have access to the
admin
schema?Allan
Hi Allan,
Thanks for your reply, yes it was in a different schema, but it's solved now..
Thank you.