Questions tagged as 'sql'

0
answers

RavenDB - How to query words by ignoring the accent

I need to do a person name query by ignoring the accent. Ex: In my document I have a record with the name "Letícia". If I consult for "leticia" the result comes empty. The behavior I need is to find the person even though the query is without...
asked by 18.07.2017 / 19:01
1
answer

Error query pdo (Sort by count) [closed]

I'm trying to make a ranking based on the amount of coins in each. In descending order. I used this query in pdo: $ranking = $pdo->query("SELECT * FROM usuarios WHERE banido='false' GROUP BY usuario ORDER BY count(moedas) DESC LIMIT 3");...
asked by 29.06.2017 / 20:51
1
answer

Error 1452 mysql: Can not add or update a child row

I created the following tables and populate them in 2 (user and type); CREATE: CREATE TABLE utilizador(utilizador_id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,username VARCHAR(100) NOT NULL, password VARCHAR(100) NOT NULL, morada VARCHAR(100)...
asked by 17.07.2017 / 02:32
0
answers

Problem with trigger change

I have a table that receives data all the time, almost every second. This table has a trigger that after insertion of a new row inserts this record into another table. I need to include a new trigger in the same table and I have some question...
asked by 05.06.2017 / 16:47
0
answers

How to pass a query to Eloquent?

I'm trying to translate a SQL to Eloquent , where it gets an id ( $myid ) and returns the clothes combinations, clothes and I have another table combinations_clothes and in this case I have a relation m...
asked by 19.06.2017 / 00:30
0
answers

Incorrect syntax near the keyword 'ORDER'

I started performing a program in classic asp and in a part of this program I wrote the following code: <% SQL = " SELECT Id = TCD.Id "_ & " , IdTipoContrato = TC.IdTipoContrato "_ & " , Codigo...
asked by 09.06.2017 / 16:08
2
answers

Suggestion Migration System and modeling of individuals and legal entities in a system with Entity Framework

Well, the question is this. I have a database that has the purpose of making the cash book of a company, basically this bank has a CaixaCorrido table with columns Id , PessoaNome , DataHora , Descricao , Valor...
asked by 09.03.2016 / 15:23
1
answer

Group data from a Query?

I do a GROUP BY in a query result and the result comes like this: Iwouldliketoknowifitispossibletobringgroupedinthisway? I'd like to know if this collation is best done in PHP or Query and how can it be done? Follow my code: SQL...
asked by 22.05.2017 / 18:22
0
answers

How to send the result of a query via email

I wondered if anyone would know how to do this to run the query correctly. I need this to be sent to the email appearing the result that in the case would be Name: Ariel [select rtstr1 as hostname from poldat_view where poldat_view.polcod...
asked by 07.06.2017 / 18:22
3
answers

Doubt SQL Query Business Days

Good evening! Well, I need to know the following result. I want to bring the workdays grouped by month and year from April to June of this year of 2017. Example: Ano Mês Dias Uteis 2017 Abril 19 2017 Maio 18 2017 Junho...
asked by 01.07.2017 / 04:12