Welcome Guest, Not a member yet? Register   Sign In
organization of crud for postgrsql
#3

(This post was last modified: 05-29-2020, 11:12 AM by richb201.)

Well I decided to go back and hit the manual again. This is what the manual says:
Connecting to your Database
You can connect to your database by adding this line of code in any function where it is needed, or in your class constructor to make the database available globally in that class.

$db = \Config\Database::connect();
If the above function does not contain any information in the first parameter it will connect to the default group specified in your database config file. For most people, this is the preferred method of use.

In my case I am using $db=\Config\Database::connect('postgres');
I am getting an error when I call this: "Class Config\Database' not found" Does anyone know what this means?
I also see a note in the manual that says: "If the above function does not contain any information in the first parameter it will connect to the default group specified in your database config file. For most people, this is the preferred method of use.". What first parameter are they talking about? I don't want to use default  since that is my local mySQL. 
What does "not contain any information in the first parameter" mean, in this case?
proof that an old dog can learn new tricks
Reply


Messages In This Thread
organization of crud for postgrsql - by richb201 - 05-26-2020, 12:17 PM
RE: organization of crud for postgrsql - by richb201 - 05-29-2020, 11:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB