/    Sign up×
Community /Pin to ProfileBookmark

my sql command can work but now can’t,I did not upgrade any thing

Dear All,

According to I developed a software for my customer and I host my website on a shared host.
Could you please kindly help me check about this command?
`SELECT DISTINCT guest_id FROM chat_message WHERE user_id = 4 AND send_receive = 2 AND CAST(timestamp AS DATE) = CAST( curdate() AS DATE) ORDER BY timestamp DESC`

Before it can work but just yesterday it didn’t work. the error message about can’t order by timestamp because not include on select

to post a comment

2 Comments(s)

Copy linkTweet thisAlerts:
@sibertOct 20.2021 — Will this work?

<i>
</i>SELECT DISTINCT guest_id, timestamp
FROM chat_message
WHERE user_id = 4
AND send_receive = 2
AND CAST(timestamp AS DATE) = CAST(curdate() AS DATE)
ORDER BY timestamp DESC
Copy linkTweet thisAlerts:
@NitiphoneauthorOct 21.2021 — @sibert#1638361 Yes, so I tried to remove it by

SELECT DISTINCT guest_id FROM chat_message WHERE user_id = 4 AND send_receive = 2 AND CAST(timestamp AS DATE) = CAST( curdate() AS DATE)

It can work normally
×

Success!

Help @Nitiphone spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.26,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...