Questions tagged as 'sql'

1
answer

Error in Wordpress in the Administrative panel

Staff developed a Wordpress site that can be viewed from this link by accessing the wp-admin this error appears, which can be: I installed a plugin of quiz was moving normally and out of nowhere this error appeared     
asked by 20.08.2018 / 21:59
1
answer

Create slug across the MYSQL database

I have an older MYSQL database and it has a news table and I needed to create a "slug" column to save the news slug. So, I would like to create an automatic slug for all records that are registered in this table. Table: Columns Titulo --...
asked by 16.08.2018 / 15:57
1
answer

relate two tables

I would like to know how I can relate two tables to different databases so that every time the value in the table bank1.dbo.table id1 will be changed also in bank2.dbo.table id1, modifying according to the row (id) which is being modified The...
asked by 19.09.2018 / 07:55
3
answers

I can not average

I'm not able to make the sum between qtd_itens_bought and count_count. The query runs normal, at the frequency the result is the same as the amount of items that comes from the "qtd_itens_compra". In short, I would like to add up all the items a...
asked by 13.08.2018 / 16:49
2
answers

Repeated values when making an INNER JOIN

This code below is bringing repeated values to the screen. Could anyone help me? $id_credenciado = $_SESSION['id_credenciado']; //$sql = mysqli_query($conn, "SELECT DISTINCT * FROM tb_protocolo INNER JOIN tb_certidao ON tb_protocolo.id...
asked by 10.08.2018 / 21:19
1
answer

Information gets out of the table in while

Only the first tbody information is displayed but the others appear in lines outside the table. That's the part of my code. What could be making this happen? <?php } }else { $sqle = mysqli_query($conn, "SELECT * FROM jsondados...
asked by 08.08.2018 / 18:28
1
answer

Is it possible to perform a filter through a calculated column?

Gentlemen, I am performing the following select in my database. SELECT TOP 5 A.APELIDO, A.REALIZADO, A.META, CAST((A.REALIZADO/A.META)*100 AS DECIMAL(10)) AS ACUMULADO, DENSE_RANK() OVER (ORDER BY ((A.REALIZADO/...
asked by 09.10.2018 / 14:42
2
answers

Store multiple values in the same database column, how far is it worth it?

I realize that a lot of people run into this question at some point in development, "Do I put the values separated by a comma in the same column? Or do I create an auxiliary table?", both questions have their points to analyze.    I would like...
asked by 01.08.2018 / 07:19
1
answer

Help in displaying data saved in a database on a php page

So, guys, I'm just starting to learn how to mess with php and I'm trying to make a registration system that will register on it. I already managed a lot, I could connect the bank, I was able to save data in phpmyadmin through a form. However, wh...
asked by 09.10.2018 / 18:56
2
answers

SQL how do I insert into a table that has FK?

How do I insert into in a table where there is an FK? example this is my structure Pessoa ID (primary key) nome varchar(20) id_endereco int not null (foreign key) _______________________________________ endereco ID (primary key) rua...
asked by 10.10.2018 / 10:18