1
Good afternoon,
I have the following table..
*eventos*
----------------------------------------
| id_evento | id_projeto | nome_evento |
----------------------------------------
I need to make a process as follows:
"Select events where the id_project is 1 with a limit of 2 records, but if the number of records is less than 2, select the last recorded events to complete the total number of 2 records."
Detailing... I need to select the records that have determined id_projeto
but if by chance there is no record(with this id) I need to select the last two of the table events, and if by chance there is only 1, then I need to select only 1 more record.
I hope I’ve been clear. Any questions I answer.
Obs.: I am using mysql database
The gist of the matter is greater than the question ue q q isso kkkk
– Francisco
@Francisco kkkkk truth ^^
– Andrei Coelho