2
I have the following problem, I created a form in which the value that the user has to write goes to the top of the table, leaving the oldest down, or make my SELECT can select only the last 10 records of the table. Can someone help me?
UPDATING!!!
My code is like this :
$result = "SELECT id, filmes FROM dados_rec ORDER by filmes DESC LIMIT 10";
$query = mysqli_query($link, $result);
$row = mysqli_fetch_row($result);
echo $row[1];
echo $row[2];
echo $row[3];
It prints only the first, which in case is the name of a movie, but it ignores the other "Excerpts"
I think it’s simpler to make a select with
ORDER BY campo DESC
– rray
I’ve already done it, but it shows me in alphabetical order, I just need it to show me the latest records
– Luvinicius
If you have a field with the registration (date and time) of the business order by it or you can do by id.
– rray
Can you explain me how to do by id? I started now in php and know almost nothing.
– Luvinicius
Instead of placing the field with title/name in the
ODER BY
puts the id field.– rray