S
S
Sergey Defactov2017-02-12 13:47:19
MySQL
Sergey Defactov, 2017-02-12 13:47:19

Weekly post output?

How can I add the output of viewed posts for a week with such a request?
Where Views - Views
($sqlConnect, "SELECT `id` FROM {$type_table} WHERE `postType` = 'post' ORDER BY `views` DESC LIMIT 3");

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Regretful, 2017-02-12
@regretful

SELECT `id` FROM {$type_table} WHERE `postType` = 'post' AND date_publish BETWEEN date_start AND date_end ORDER BY `views` DESC LIMIT 3

date_publish - date of publication
date_start - start of week
date_end - end of week

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question