Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6254161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:08:13+00:00 2026-05-24T14:08:13+00:00

How do these results make sense? I don’t understand. Shouldn’t for example the last

  • 0

How do these results make sense? I don’t understand.
Shouldn’t for example the last query return an empty set since that there are no threads with date > 2010? Why does it return a result from 2003?

mysql> SELECT * 
       FROM thread 
       WHERE newsgroup_id = '64654' 
       AND 'thread_date' < '2010-09-10 21:43:05' 
       LIMIT 1;

Empty set (0.00 sec)

mysql> SELECT * 
       FROM thread 
       WHERE newsgroup_id = '64654' 
       AND 'thread_date' < '2000-09-10 21:43:05' 
       LIMIT 1;

Empty set (0.00 sec)

mysql> SELECT * 
       FROM thread 
       WHERE newsgroup_id = '64654' 
       AND 'thread_date' > '2000-09-10 21:43:05' 
       LIMIT 1;
+--------------+-----------+-----------+----------+---------------------+---------------------+---------------------------------+-------------------------+
| newsgroup_id | thread_id | postcount | hash     | thread_date         | thread_date_last        | thread_title                    | title_has_valid_charset |
+--------------+-----------+-----------+----------+---------------------+---------------------+---------------------------------+-------------------------+
|        64654 |         1 |         0 | O2gvcPRl | 2003-06-06 22:51:24 | 0000-00-00 00:00:00 | Vendo fotodigit  2.1  megapixel |                       0 |
+--------------+-----------+-----------+----------+---------------------+---------------------+---------------------------------+-------------------------+

1 row in set (0.00 sec)

mysql> SELECT * 
       FROM thread 
       WHERE newsgroup_id = '64654' 
       AND 'thread_date' > '2010-09-10 21:43:05' 
       LIMIT 1;
+--------------+-----------+-----------+----------+---------------------+---------------------+---------------------------------+-------------------------+
| newsgroup_id | thread_id | postcount | hash     | thread_date         | thread_date_last    | thread_title                    | title_has_valid_charset |
+--------------+-----------+-----------+----------+---------------------+---------------------+---------------------------------+-------------------------+
|        64654 |         1 |         0 | O2gvcPRl | 2003-06-06 22:51:24 | 0000-00-00 00:00:00 | Vendo fotodigit  2.1  megapixel |                       0 |
+--------------+-----------+-----------+----------+---------------------+---------------------+---------------------------------+-------------------------+

1 row in set (0.00 sec)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T14:08:13+00:00Added an answer on May 24, 2026 at 2:08 pm

    You are using wrong type of quotes. MySQL thinks that you are comparing string “thread_date”. Here is how it should be:

    `thread_date` > '2010-09-10 21:43:05'
    

    This way MySQL knows that you mean field thread_date and compares it to the date at the right side of expression.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form that shows results from a database query, these results can
Can someone explain why I get different results from these two statements? I thought
I have two mysql tables and i want to merge the results of these
and get meaningful results. Currently I am running these three queries: SELECT t.type,t.id,s.title FROM
I am using a dropdown to allow the user to sort search results. These
Hey I'm trying to return a message when there are no results for the
Sorry if this question doesn't make any sense. I'm currently in the midst of
I have a search page that if there is results in the list it
These two querys gives me the exact same result: select * from topics where
Of these two options: var result = from c in coll where c %

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.