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

  • Home
  • SEARCH
  • 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 8015049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:08:17+00:00 2026-06-04T20:08:17+00:00

following is my sql query in which i am trying to filter the result

  • 0

following is my sql query in which i am trying to filter the result as per dates (Greater than) difference. The SQL function “Date(FROM_UNIXTIME(i_last_updated))” returns the dates successfully but the following query is not filtering the results as per where clause check. Kindly let me know is there something wrong with my sql query and how can i correct that. Thank you

NOTE: “I successfully did it by using simple if/else but i want to know is there any possible way to do it with sql query”

$d= "2012-12-25"

$sql2 = "SELECT attendees FROM event_attendees where Date(FROM_UNIXTIME(i_last_updated)) > $d";
  • 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-06-04T20:08:19+00:00Added an answer on June 4, 2026 at 8:08 pm

    You missed the ' around the date variable:

    $sql2 = "SELECT attendees FROM event_attendees where Date(FROM_UNIXTIME(i_last_updated)) > '$d'";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following Linq to SQL query, in which I'm trying to do
I am trying to develop a T-SQL query which will do the following: ROUND(100
Have the following (non-straightforward) T-SQL query, which i'm trying to convert to LINQ (to
I have following somewhat complex sql query which has horrible performance, 'certainly' due to
I have a drop-down list which is generated based on the following sql query:
I have the following which works in SQL Query Analyzer . select oh.* from
I have the following sql query and I want to filter the results where
I am trying to create a products table running the following SQL query: CREATE
I am trying to write an SQL (Server) query which will return all events
I'm trying to write a sql query to the following (from this site http://sqlzoo.net/1b.htm

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.