Questions tagged as 'sql'

1
answer

How to determine the type of data to use in this flexible case?

The project consists of a database for RPG tokens (D & D and similar). It looks like this:    Database   tab       Tables       character    system    raca    class    attribute    character_atribution    Relationships      ...
asked by 16.11.2018 / 23:23
1
answer

SELECT TO REDUCE VARIOUS INPUTS SEEN IN MYSQL

Good morning, I have searched and found nothing very useful. I have an inventory database of my Network Stations. The agent installed on each station sends the names of installed programs to the softwares.name table. When I make a select...
asked by 14.11.2018 / 14:33
0
answers

How do I pass information in the bindvalue with two or more information stored in the variable?

I'm having a problem ... I'm getting some id in the database and storing it in $ids_cozinha . I gave var_dump and print_r , I'm returning the ids I want, so far so good. <pre> <?php print_r(implode(", ",$ids_cozinha...
asked by 22.11.2018 / 18:45
0
answers

How to resolve the error Notice: Trying to get a non-object property of a select with WHERE

I'm trying to display a list of subscriptions for a particular user. The getuser() method captures the id of the session user and displays the list of entries created by it. However, I'm trying to display these records on screen, while...
asked by 18.11.2018 / 22:23
1
answer

How to insert the PK value of one table in the FK of another table

I created a usuario table using: CREATE TABLE usuario( usuario_id int NOT NULL auto_increment PRIMARY KEY, nome varchar(200)); Then another table using: CREATE TABLE image( id int NOT NULL auto_increment PRIMARY KEY,...
asked by 11.11.2018 / 18:33
2
answers

SQL: Make comparison between 2 columns and return only 1

I have a client table that includes PF and PJ clients. In this table, if the customer has CPF, they do not have a CNPJ, if they have a CNPJ they do not have a CPF. I need a query that checks which of the two columns is not null and returns only...
asked by 09.11.2018 / 21:52
1
answer

Doubts with ide Dbeaver

I'm using DBeaver with DBMS oracle . I wanted to make an average runtime to compare at the time of optimizations, but I'm in doubt, which means "688 row(s) fetched - 3ms (+20ms)" With this 3ms outside the parentheses and the 20 insi...
asked by 10.11.2018 / 12:05
2
answers

Merge column data inline - SQL Server

I have the following situation: Usuario_A telefone1 Usuario_A telefone2 Usuario_A telefone3 How can I do that when I make a select, have the following output: +-----------+----------------------------------+ | Usuario_A | tel...
asked by 08.11.2018 / 17:08
0
answers

Changing parameters in power bi

Good morning, I'm starting now in Power BI and I'm trying to make two sql queries swap parameters. At first query I have a query sql returns the project code and the name of it. In the second query I have the following proc (exec [dbo]....
asked by 07.11.2018 / 13:36
9
answers

How to prevent SQL injection in my PHP code?

I developed a page in PHP for internal use of the company I work with and only very few people use it. You can use this page to do some queries, insertions, changes and deletions of a table in a MySQL database, however I believe that my PHP code...
asked by 03.02.2014 / 13:37