Help with query result MIN or LIMIT

Help with query result MIN or LIMIT

ved Plínio Felipe Peçanha Oliveira -
Antal besvarelser: 2
Hi, I appreciate any help.

I'm creating a more complex query and this would be a fragment of the other one.


SELECT
DATE_FORMAT(FROM_UNIXTIME(timecreated),'%d-%m-%Y') AS 'Nível:'

FROM prefix_logstore_standard_log
WHERE eventname LIKE '%course_viewed%'
#USERID
AND userid=20765
ORDER BY timecreated ASC

Turns out I'm not getting it right so that this query returns only the first result of "course_viewed", it's still returning several rows and I just need to display the first register.

If anyone can help, thank you in advance.
Gennemsnitsbedømmelse:Useful (1)
I svar til Plínio Felipe Peçanha Oliveira

Re: Help with query result MIN or LIMIT

ved Thomas Stanley-Jones -

I'm thinking you are just missing the last line,

LIMIT 1
Gennemsnitsbedømmelse:Useful (2)