Questions tagged as 'sql'

2
answers

Error displaying array in PHP

I have this array in PHP and should display the users name and email field. However, php displays an error message: array(4) { [0]=> object(stdClass)#25 (5) { ["idusuario"]=> string(1) "2"...
asked by 07.10.2017 / 19:10
3
answers

SQL does not work

I have this SQL function in a php code but I am not going to fetch the requested data from the database $query_part = "SELECT * FROM participacao WHERE manutencao = 'Equipamento' AND 'Material de saude' ORDER BY Id DESC"; How should I wri...
asked by 23.12.2017 / 02:22
2
answers

Doubt - SQL Server Query

How do I get the sql server to get the records longer than 10 days from the current date, ie in the current month, I want to get all the records prior to 01-08. I tried it that way, but it did not return anything. SELECT S.SolID [Chamado], UC....
asked by 10.08.2017 / 19:55
1
answer

SQL - Delete records that have field with the same value as another, only when there is more than one record

I have a barcode table of products, I want to delete only the barcodes that are equal to the product code and have another code besides this. Table: CodProduto CodBarra 01 01 < não deletar 02 02 <...
asked by 16.08.2017 / 18:13
1
answer

sql search with higher and lower end date

My code should return values from the database, related to the current day (today), but only related to the month and day, I searched a lot but could not find something that would help me $data_atual = date("d-m"); $mostraDados = mysqli_query(...
asked by 13.10.2017 / 07:42
3
answers

Adding the data from a sql column C #

My problem is this: I need to add the total hours of the employee that are in the bank, already in a separate column. Just to make it clear, the hours that the employee worked on the day are ready, I want to add these total hours. Note: I think...
asked by 24.08.2017 / 04:55
1
answer

Trigger to update stock

I'm trying to create a trigger to update my product inventory, when the status of my purchase is closed (CF = Buy Closed). However, it is giving me an error, and I could not identify what is causing this error to be generated. Anyone h...
asked by 23.08.2017 / 23:30
1
answer

SQL command does not work with select [closed]

Follow my complete code: <? include("conectar.php"); $query = "select * from pagseguro ORDER BY Referencia DESC"; $result = mysqli_query($db, $query) or die(); if($_REQUEST['alterarStatus']){ $status = trataaspas($_REQ...
asked by 18.09.2017 / 15:55
1
answer

Connection between two DBMS Sql Server

Is there any way beyond Linked to connect two DBMSs? Problem: I need to use tables from another database that is on another server with SQL SERVER installed. My current server is also SQL Server;     
asked by 26.10.2017 / 14:56
1
answer

Change GridView

Ineedtochangethesetwofields(category_idanddesc_category)Form: private void Mostrar() { this.datalista.DataSource = NCategoria.Mostrar(); } Business layer //Método Mostrar public static DataTable Mostrar() { return n...
asked by 26.09.2017 / 02:20