on 2018 Sep 13 11:33 AM
I need to write a custom dao the allows me to fetch product that are staged, approved and are modified between a timeline but i'm not sure what query i'm supposed to write. Someone please help
Request clarification before answering.
Quite frankly, I shouldn't even answer such a basic question. If you would ask a similar basic question on Stackoverflow, they would troll you like there is no tomorrow.
But, since I'm bored:
select {p:code}, {c:id}, {v:version}, {p:modifiedTime}
from {product as p join catalogversion as v on {v:pk} = {p:catalogversion} join catalog as c on {v:catalog} = {c:pk}}
where {v:version} = 'Staged'
and {p:modifiedTime} >= "2018-09-12 00:00:00"
and {p:modifiedTime} <= "2018-09-13 23:59:00"
The timestamps are specific to the database you use, those above work for MySQL.
And next time, think for yourself first.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.