Questions tagged as 'query'

2
answers

How to set up a SQL to display grouped content per month?

I need to set up a SQL to group information by month into columns formatted by Bootstrap. Come on: <div class="container"> <div class="row"> <div class="col-md-3"> <h2 class="eventos_mes">Maio<...
asked by 21.09.2015 / 14:30
3
answers

Select to bring the amount of certain records into related tables

In the MySQL database I have these 3 tables: CONTROLS: Here I make the trainings entries made. Note that you can insert multiple collaborators on the same line EMPLOYERS: SECTORS: ThecontributorscolumnoftheCONTROLtableisaforeignkeyintheCO...
asked by 17.09.2018 / 13:18
1
answer

Where it takes a long time

I'm using Laravel 5.6 My model is normal <?php namespace App; use Illuminate\Database\Eloquent\Model; class MyTable extends Model { protected $table = 'myTable'; public $timestamps = false; } I'm trying to make a simple qu...
asked by 25.09.2018 / 22:22
3
answers

SQL Query, Always show first record of a repeating field

I'm having trouble listing only one line in each process. The query must always bring the protocols with the last revision. Ex: Show only the process of number 2 of the last revision 2 and Show only the process of number 1 of the last revisi...
asked by 20.06.2018 / 15:35
2
answers

Search in lambda query with logical operators

I have a query query for a report, where some search fields are optional except for date ranges. However, when performing the query, the function always returns values that do not match the parameters I passed at the moment of executing the...
asked by 19.06.2018 / 21:34
2
answers

Add multiple products to a single package mysql

Good afternoon I have two tables encomenda and prod_encomenda . My goal is to assign a order multiple products. Both contain id_encomenda , so I assume that the structure of the tables is well done! What I mean exactly is...
asked by 12.06.2018 / 15:57
3
answers

Delete repeated records in PHP

Good morning, I'm here with a pretty big question. I've been in this for a whole day and I still have not been able to resolve the situation. I have a database in sql server and I need to display a buttons with the records of the description of...
asked by 22.02.2018 / 12:15
2
answers

I want to search by name of any function from a search field

Folks ... how can I make a system where input text gets a name of function .. then it searches its name internally with the name that is in string . kind ... In Html I do the following: <input type="text" id="seuInput...
asked by 15.05.2018 / 04:34
1
answer

Consultation with combined criteria

I'm trying to assign more than one search criteria to the database, and I can not find anything that can help me. I'll explain better: I have a database with a "city" field, where I want the data assigned to that city to be returned. However,...
asked by 23.11.2017 / 15:09
1
answer

system with 2 databases, returning empty queries mysql php

I have a system where I have the user base that is a unified database in one database, and another system based on the system. In my pages I call them like this: <?php include("conn_user.php"); include("conn_sys.php"); ?> Here are the...
asked by 02.08.2016 / 20:38