• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Quick PHP/mySQL question

Modeps

Lifer
Alright, I've got a private message system on my site. I'm trying to alert the user to how many "new" message they have... the unread messages have a database field "Read" set as a default of "0000-00-00". So, it would be simple to just select everything except those right?

SELECT *
FROM Message
WHERE Read <> "0000-00-00"

Right?

It's not working... 🙁 Gimme a hand please?
 
I assume the read field has a column type of DATE?
In any case, I just ran a quick test, and all three (<>, >, !=) work fine from the MySQL commandline

 
I'm now wondering if Read is a reserved word.
nm: I must have had a lapse of stupidity... I got it. (was checking the wrong column... i guess that's what happens when you've been coding all day)
 
Originally posted by: Modeps
I'm now wondering if Read is a reserved word.
nm: I must have had a lapse of stupidity... I got it. (was checking the wrong column... i guess that's what happens when you've been coding all day)

Actually, I'd say you had a lapse of intelligence - the stupid bit seems to be set 😛
Been there done that!
 
Originally posted by: Armitage
Originally posted by: Modeps
I'm now wondering if Read is a reserved word.
nm: I must have had a lapse of stupidity... I got it. (was checking the wrong column... i guess that's what happens when you've been coding all day)

Actually, I'd say you had a lapse of intelligence - the stupid bit seems to be set 😛
Been there done that!

haha yeah, 🙂 thanks for all your help
 
Back
Top