Questions tagged as 'mysql'

1
answer

MySQL - Problem in WHERE clause 'column'! = NULL [BUG?] [duplicate]

I came across the following problem: In my application I have a function that checks whether some value is already in use in another record , so I should pass the id in the query of this function. And this is where the problem h...
asked by 21.04.2018 / 16:34
1
answer

SQL - Merge order and product table

Save, Stacks. I have the following table of ORDERS : 'PEDIDOS'('PEDID', 'PEDIDUSUARIO', 'PEDSTATUS', 'PEDVAL', 'PEDFORMAPAG', 'PEDTROCO', 'PEDDATA') And the following product table, where each inserted row contains the order id to which t...
asked by 22.09.2017 / 04:16
2
answers

How to display the Options (HTML) with the elements of the Database

Hello, I am trying to do the following: I want the elements that are registered in the database to appear inside a "Select - Option (FORM - HTML)". Ex: <body> <?php include("conexa.php"); $id = 80; $pegadiv = $PDO->query("SELECT...
asked by 17.09.2017 / 19:46
2
answers

Auto increment unique in all DB tables

Hello, my DB has several tables that have the same column: 'PROD' int(11) NOT NULL AUTO_INCREMENT This column is an identifier that makes one that increments each launch. The question is that it takes the same value from the other tables, i...
asked by 31.10.2017 / 14:50
2
answers

I can not insert the bank

I'm using the bootstrap on my first college project and I'm having difficulty with PHP, HTML, and MySQL interaction In addition to not being able to insert into the database, I need to insert into tipousuario_idtipousuario the value...
asked by 11.11.2017 / 11:41
1
answer

Delete record comparing values between two tables

I have two tables: produtos - id_produto valores - id_produto id_produto would be a column, same for both tables. I need to delete records from the values table, but only those that are NOT also in the products table. Ex:...
asked by 05.04.2018 / 19:16
2
answers

Show member with same column id

How do I display a list of members for each position, with some members being in more than one position. The categories where members meet, are in the same column separated by pipe ( | ). Follow the image below: Mycodeonlydisplaysthefi...
asked by 05.10.2017 / 17:49
1
answer

How to return the result of a select with prepared statement?

People, I'm not able to return the result of a search with prepared statement. Here is the code: public function search($obj) { $connection = new Connection(); $this->db = $connection->conectar(); /* String SQ...
asked by 30.07.2017 / 18:08
1
answer

Extract and include SQL data with R

I'm designing a database in SQL that will have tables that store collected data and a table that stores calculated indexes of that data for later display on a dashboard. I want to calculate these indexes with the language R. I would like to know...
asked by 31.07.2017 / 14:19
1
answer

Sort select by date

How to sort this select by DATA? (SELECT * FROM mensagens WHERE de = '2' && para = '1' ORDER BY data) UNION (SELECT * FROM mensagens WHERE de = '1' && para = '2' ORDER BY data) Test: link     
asked by 28.07.2017 / 03:07