Editor with a database schema which is not public and which has a specific name
Editor with a database schema which is not public and which has a specific name
Hello everybody.
I use editor with Join tables - one-to-many join and a database in a specific schema. I can't manage to find the syntax for the Mjoin in the php file.
I try with 'as' syntax, with ->name but the problem is with the link table in '->link'.
In sql command you must specfy the schema for example 'schema.table' or 'schema.table.column'.
Can you help me to write the php file please?
Thanks for your help.
Lionel
This question has an accepted answers - jump to answer
Answers
Hi Lionel,
You should be able to just add the schema name at the front of the links:
If that isn't working for you, what error are you getting?
Allan
Hello Allan, thanks for your answer.
I don't understand why schema2 in the first link.
All my tables are in schema1 named labo in my case.
I ever tried your syntax but it send me this eror: An SQL error occurred:
My code:
That's why i test lot of things before my question in the forum
This code almost working and only if the table user.permission is in the public schema
Thanks for your help
Ah! The default schema for the user is the
public
schema, but you want to uselabo
.You want to use the
USE
statement I think:Then remove the
labo.
from your configuration for Editor, and it should just work.Allan
Is this solution working with a posgresql database ? Your link point on mysql dev site.
Thanks for all?
No sorry - I'd assumed MySQL. I didn't realise you were using Postgres. For PG try:
See the postgres docs for the
search_path
.Allan
Hello Allan.
Tanks a lot for your help. it's now working very well. Thanks to you I learned a lot of things that will be very useful to me.
have a nice day.
Lionel