Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Synatax Query - Less than or Equal to

Engaged ,
Jan 05, 2007 Jan 05, 2007

Copy link to clipboard

Copied

Running on Linux, Apache, MySQL, PHP

I have an issue with a date query - possibly created by the MySQL format YYYY-MM-DD

I want to create a recordset where activities are less than or equal to today's date.

I've managed most of it but the result seems only to show less than and not less than and equal to.

This is the part of the query that is in question:

CONTNOTES.ACTDATE<='coldatetil'

I have tried =< without success

Any ideas?
TOPICS
Server side applications

Views

308
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 05, 2007 Jan 05, 2007

Copy link to clipboard

Copied

RichardODreamweaver wrote:
> I want to create a recordset where activities are less than or equal to
> today's date.

SELECT * FROM myTable
WHERE theDate <= CURDATE()

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 05, 2007 Jan 05, 2007

Copy link to clipboard

Copied

That's pretty much what the core of mine is:

SELECT CONTNOTES.ACTDATE, CONTACTS.CONTACTID, CONTACTS.LOGO, CONTACTS.COMPANY, CONTACTS.FULLNAME, CONTNOTES.NOTEUSER, CONTNOTES.STAGE, CONTNOTES.TYPE, CONTNOTES.NOTE, CONTNOTES.VALUE, CONTNOTES.COMPLETED
FROM CONTACTS INNER JOIN CONTNOTES ON CONTACTS.CONTACTID = CONTNOTES.NOTESCONTACTID
WHERE CONTNOTES.NOTEUSER='coluser' AND (CONTNOTES.ACTDATE<='coldatetil' OR CONTNOTES.ACTDATE is null) AND CONTNOTES.TYPE <>'10 note' AND CONTNOTES.COMPLETED=False
ORDER BY CONTNOTES.ACTDATE DESC

And yet it still only seems to return the less than part of <=

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 08, 2007 Jan 08, 2007

Copy link to clipboard

Copied

LATEST
Any Ideas?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines