Questions tagged as 'sql'

1
answer

Friendship system

I am making a friendships system (look at img) In users shows all the people that I can add as friends, I want to remove from the list of users all the people that already sent me friend request is all the people to whom I sent friendship req...
asked by 10.01.2018 / 00:42
1
answer

I can not create the connection to the bank in my php file

I'm trying to connect to the bank but only this error appears:    Fatal error: Uncaught PDOException: could not find driver in   C: \ xampp \ htdocs \ PDO \ Example-02.php: 3 Stack trace: # 0   C: \ xampp \ htdocs \ PDO \ Example-02.php (3):...
asked by 13.01.2018 / 23:28
1
answer

Convert String to INT

How to convert the string of the variable fg to an integer? if (connectionIsOpened) { String s = "INSERT INTO jogador(nome) VALUES " + "('" + this.playerName + "'" + ")"; connection.executeUpdate(s); String fg = "SE...
asked by 04.02.2018 / 17:08
1
answer

Read array from a field

In a sql query, it returns me that $ 10.30,40.50 value from the "mark_ups_range" fields How to read and quit lines in these values? example 10 30 40 50 $sql1 = "SELECT mark_ups_range FROM config_politicas WHERE id_transfer = '1'...
asked by 04.02.2018 / 19:20
2
answers

Doubt about Querys

I'm trying to create a view to return the query from a Query. My problem is that I wanted it to return values for each product and it is returning the same value for the products. SELECT B.ID_Caso, B.Nome_Caso_Teste AS PRODUTO, (SELECT COUNT(S...
asked by 08.01.2018 / 13:26
1
answer

Invalid SQL identifier - Oracle

CREATE TABLE IndustrialUnit ( UnitId NUMBER (7,2) PRIMARY KEY, Location_place VARCHAR(50), Country VARCHAR (50), FOREIGN KEY (ProdId) REFERENCES Production(ProdId) ); When I try to set the FOREIGN KEY, the following error occurs: ORA-00904: "P...
asked by 06.01.2018 / 19:40
1
answer

Make truncate by ignoring the foreing key

   Can not truncate table 'ARITREINAMENTO.glo.tbEndereco' because it is   being referenced by a FOREIGN KEY constraint. Truncate has already been run in the agency table that references the address that is, there are only addresses in the ta...
asked by 22.12.2017 / 13:28
2
answers

Problem sending input value (which is updated in a While) to another page via POST

I have a% re loop of% that creates fields according to the number of client counties. I need to pass the while variable via POST method to be inserted in the Database on another page. In case you have only one municipality, POST wor...
asked by 13.12.2017 / 14:26
2
answers

PostgreSQL Error: "ERROR: there is no unique constraint matching given keys for referenced table" address ""

I created the Address and Client table, as follows sql: CREATE TABLE ENDERECO( Logradouro VARCHAR (50) NOT NULL, CEP VARCHAR(50) NOT NULL, Numero INT NOT NULL, Complemento VARCHAR(50), Cidade VARCHAR (50) NOT NULL, Bairro VARCHAR (50) NOT NULL...
asked by 13.12.2017 / 03:53
1
answer

Query PIVOT or SUM

My query is as follows: mysql> select product_id, presentation, price from Variant where product_id = "1604"; +------------+-------------------------+-------+ | product_id | presentation | price | +------------+-----------...
asked by 13.12.2017 / 14:36