If the user does not find the desired item in the dropdown list, it can include a new item, for this I used the prompt function of javascript , and then the user types the name and clicking Ok , if the object is not a...
I would like to perform an update ordering the results of it, so I wanted to run an update like this:
UPDATE pessoa SET nome = 'Jose'
WHERE sobrenome LIKE '%Betalla%'
ORDER BY nome
But when I try to perform this update, an incorrect syntax...
Sort the last ads registered in mysql, with the dates closest to the current date using PHP
The field type (date) in mysql is as (date)
This is my query :
SELECT * FROM frame_anuncio WHERE ativo = 'Sim' ORDER BY destaque ASC LIMIT $inicio...
I am doing a descending order to list winners, however it is based on note.
My search is as follows:
public function getHistorico($id_avaliacao)
{
return $this->where('avaliacao_id', $id_avaliacao)
->orderBy('nota', 'des...
In MYSQL I have two tables, product and product_photo.
In the product_foto table there is a field that calls first , which normally has its value 0. In the site administrative system there may be a marking of which photo will be the first...
I have two tables ( user and log ), and would like to list the users by sorting by the last logged in. I'm using GROUP BY to join the logs (since a user can have more than one).
The problem occurs when I add the ORDER BY , return...
I'm having to create a query that returns the data sorted by a specific field, for example name, but the first return line must be the last id. Can you do this with sql?
Let's suppose I have the user table:
id nome
1 João
2 Marce...
I have an object of type Ata where I have the property NroAta that corresponds to the number of the Minutes in question, but in the grid when I will sort by this number, it ends up putting the numbers in the wrong order. Ex.:...
Is it possible that if we have multiple clauses in order by , they are in conflict with each other? For example:
select candidato.nome
from candidato, perfil_oferta, prova_de_afericao
where candidato.bi = prova_de_afericao.cod_prova and...
I want to do an ordered SQL query for the first 3 months from the current month, for example:
Current month is August (08), so I order as:
10
9
8
1
12
I am using the following command:
SELECT * FROM 'tb_convencao' WHERE 'lg_historico'...