Questions tagged as 'postgresql'

1
answer

get a data of the last insert made

The case is as follows, I have two related tables in postgres, understand Urbanization and Houses in Urbanizacion we have the following data idurb(PK-NoIncremental,varchar)| nombreurb | calle | idcasas(el campo idcasas es una FK ) and...
asked by 23.10.2018 / 04:11
1
answer

Activate postgresql TCP / IP connections

Greetings I have the following problem I have a server in the cloud where I have hosted my database in postgresql. Through my application in JAVA I can access my database from any point with Internet. I am doing an application in php with the...
asked by 22.08.2018 / 00:36
1
answer

Validate events and visualize at the moment in full calendar

I have a reservation calendar. The problem I have is the following: with a URL and a view I keep the events. to show the events I have another URL as a view for it. And what I want to do is to save the events that can be shown to me in the sa...
asked by 02.08.2018 / 06:59
0
answers

PostgreSQL select limit with with as does not work

I need to make a limit after inserting an with as but it does not work, the following example, the obj_json is a parameter of a function: WITH sub_query AS ( SELECT hce_id_pk, per_numeroidentificacion, per_apell...
asked by 09.07.2018 / 22:08
1
answer

How can I avoid duplicate data when filling an array from an sql query?

I want to bring several data according to the year to which the data belongs, but when making a foreach I create more arrangements with the same year, and does not unify the data for the same year: See base de datos : $dataa...
asked by 07.06.2018 / 22:54
2
answers

how to link symfony to a postgresql database

I have a project in symfony, but I need it to be with a database in postgresql, but when I try it it gives me the following error I do not have the xampp, in the machine I only have php and I work directly with the server that generates th...
asked by 03.05.2018 / 15:27
0
answers

Check dates Postgres

I need help with a query what I want is that I need to calculate the months of a worker of a company and add them with all the other contracts he had. EJ: If you started working on a date like 06/15/2016 until 06/15/2018 (24 months), but...
asked by 16.04.2018 / 16:14
0
answers

psql trigger for update in single table field

I have two simple tables: CREATE TABLE nene( id integer primary key, nombre character varying, altaCasal integer); CREATE TABLE actividades ( nen integer, actividad character varying, CONSTRAINT nen_fkey FOREIGN KEY (nen) REFERENCES public.n...
asked by 06.04.2018 / 12:04
0
answers

POST http: // localhost: 3000 / product 500 (Internal Server Error) AngulaJS, Express, Node and Postgres

I need help to solve the following, I am making the connection to the BD, when I do a GET it works very well for me, but when I do a post, I get this error: POST http://localhost:3000/product 500 (Internal Server Error) I'm doing it this wa...
asked by 02.04.2018 / 04:39
0
answers

I would like to know how to enter the result of a postgreSQL query in another totally different query from a PHP script

<?php require_once("conexion.php"); $dbconect=new conexion(); $dbconect->conectar(); $nombre = $_POST['nombre']; $apellido = $_POST['apellido']; $cedula = $_POST['cedula']; $user = $_POST['user']; $pass = $_POST['pass']; $fecha_nac = $_...
asked by 28.03.2018 / 17:08