Category : postgresql

I stuck into this loop where I kept getting while running : php artisan migrate:refresh Database connection [localhost] not configured. In my database.php, I have this set ‘connections’ => [ ‘pgsql’ => [ ‘driver’ => ‘pgsql’, ‘url’ => env(‘DATABASE_URL’), ‘host’ => env(‘DB_HOST’, ‘127.0.0.1’), ‘port’ => env(‘DB_PORT’, ‘5432’), ‘database’ => env(‘DB_DATABASE’, ‘forge’), ‘username’ => env(‘DB_USERNAME’, ‘forge’), ..

Read more

SQLSTATE[42703]: Undefined column: 7 ERROR: column course_files.courseid does not existnLINE 18: FULL OUTER JOIN course ON course.id=course_files.co…n ^nHINT: Perhaps you meant to reference the column "course_files.courseId". Getting the above error for the below code. I wanted to fetch data by joining courseId,skillId,subjectId & fileId of course_files table on the id column of course,skill,subject & files ..

Read more

I’m using this to connect to a PostgreSQL database with PHP 7.3. The connection fails, but the error message is empty. How can I see the error? $sConn_string = "host=localhost port=5432 dbname=mydb user=postgres password=mypassword "; $db = pg_connect($sConn_string); if (!$db) { echo "Error 0: " . pg_last_error(); } pg_result_error() also gives me an empty message. ..

Read more

I have a laravel App on elastic beanstalk on AWS. And I am using Postgres as the DB. It is an AWS linux 2. When I try connecting even local to the db I get this error. I tried modifying the db’s inbound rules, still not working. IlluminateDatabaseQueryException: SQLSTATE[08006] [7] FATAL: password authentication failed for ..

Read more

Bom dia pessoal, estou com este erro no meu código que não consigo resolver.. Está é a query: $query = ‘INSERT INTO organizacao ( idOrganizacao, nome, url ) VALUES ( "$idOrganizacao", "$nomeOrganizacao", "$urlOrganizacao" )’; $res = pg_query($conn, $query); e este é o erro que retorna PHP Warning: pg_query(): Query failed: ERROR: column "idorganizacao" of relation ..

Read more

I have this array list: "data": [ { "id": 1, "name": "BProject 1", "irr": null, "status": 14, "companyName": "Investor 1", "totalPaidIn": "2 020 000,00", "totalPaidOut": "36,00", "boardMembers": [ { "id": 4, "email": "[email protected]", "fullName": "Intl Investor", "firstName": "Intl", "lastName": "Investor" }, { "id": 5, "email": "[email protected]", "fullName": "Kamala Garu", "firstName": "Kamala", "lastName": "Garu" } ], ..

Read more

$db[‘default’] = array( ‘hostname’ => ‘localhost’, ‘username’ => ‘postgres’, ‘password’ => ‘malikijaz’, ‘database’ => ‘testing’, ‘dbdriver’ => ‘postgre’, ‘dbprefix’ => ”, ‘pconnect’ => FALSE, ‘db_debug’ => (ENVIRONMENT !== ‘production’), ‘cache_on’ => FALSE, ‘cachedir’ => ”, ‘char_set’ => ‘utf8’, ‘dbcollat’ => ‘utf8_general_ci’, ‘swap_pre’ => ”, ‘encrypt’ => FALSE, ‘compress’ => FALSE, ‘stricton’ => FALSE, ‘failover’ => ..

Read more

My code: $stmt = $pdoConnection->query(‘SELECT $${"data":1}$$ as result’); $stmt->execute(); $data = $stmt->fetchAll(); I expected that $data should contain something like [‘result’ => ‘{"data":1}’] But I got [‘result’ => ‘{"data"$1}’] (my query is :1 but result is $1) I think the problem with PDO extension, anyone have a solution for this problem? Sourc..

Read more