I am attempting to load many CSV files of historical data to a PGSQL server with PHP. I noticed PHP provides a pg_copy_from() function for loading local data into a remote server, but the exact format of the input is vague. The documentation says it expects an array of rows, each row being a delimited string of the values in
Tag: postgresql
group by date and show the values of X(column) which depends on min time of that date and max time of that date in 1 row
I have table like id u_id date time x —|—–|————|——–|—– 1 | 1 | 20200806 | 0900 | 60 2 | 2 | 20200806 | 0905 | 60 3 | 3 | 20200806 | 0910 | …
How to encrypt a column value on an already filled table with unencrypted data in an existing laravel projects?
I have a laravel project that already been running in production but now I want to encrypt confidential data which is salary column, here is the example of my table I want to use laravel encryption , so how to update my existing table and continue using laravel encryption Answer Instead of running any query into the database I’d prefer
Updating postgres with if conditions on parameters
I am trying to do a postgres update using if conditions to check if a parameter is empty before attempting to update. The desired result would be not to update when the parameter is an ampty string. I cannot seem to figure out the correct way to do this. My first attempt is below: and then my second attempt was
I can’t get the results of the interrogation.(postgresql and php)
I want to search by output but I am doing wrong where it somehow doesn’t work. I am using PostgreSQL. SELECT CDR.xml_cdr_uuid, CDR.direction, CDR.caller_id_number, CDR….
PostgreSQL integer field is returned as string in PHP
I’m using PHP 7.2.12 and PostgreSQL 9.5.5 and Lumen 7 when i execute a query with query builder, Lumen give me numeric column as string. Table: id: bigint { id: “1” } i have searched for and …
Fix broken migrations by “resetting” to current schema
We have taken over an old (3 years) Symfony 3.3 project using the doctrine-migrations 1.0 bundle for handling migrations. Unfortunately, the migration scripts have been broken for some time without …
Laravel 6 PHPUnit Testing – could not find driver (SQL: PRAGMA foreign_keys = ON;)
I’m started to write tests in Laravel. My application works, I can login, run migrations, but when I’m trying to test the login, I’m getting the following error: could not find driver (SQL: PRAGMA foreign_keys = ON;) My DB is in Postgres, and my test is as follows: I’m not worried (for now) if my test is good enough or
How can i get the id of the user i just added in a store function() Larevel 6.0
I did a register of users in my own controller, i want the id of the user i just added because i want to use it in another table in that same controller and function Below i will let the code of how …
Delete information from database using laravel 6.0 and function destroy doesnt work [closed]
I am trying to eliminate an event that I created before. I tried to use the function destroy() but it didn’t work. I think that the cause could be the route in the view <!–Here it is the code of …