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 8770539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:34:31+00:00 2026-06-13T17:34:31+00:00

Just can’t get this to work. I want to check if this user bought

  • 0

Just can’t get this to work. I want to check if this user bought a $45 or more bid pack in the last 7 days.

    $big_amount="45";
    //check if the user has purchased bids
    $strFind="SELECT * FROM `prepaypal` WHERE `memid`=\"$curmemid\" AND `success`='Y' 
    AND `pid`='0' AND `amount`>=\"$big_amount\" BETWEEN NOW() and DATE_SUB
    (`date`, INTERVAL 7 DAY) ORDER BY `date` DESC LIMIT 1";
    //echo $strFind;
    $result=mysql_query($strFind) or die(mysql_error());
    $row=mysql_fetch_array($result);
    $bought_bids=$row['id'];
  • 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-13T17:34:33+00:00Added an answer on June 13, 2026 at 5:34 pm

    That select statement is not right at all, you should do it this way:

    SELECT * FROM `prepaypal` WHERE `memid`= $curmemid AND `success`='Y' AND `pid`='0' AND `amount`>=$big_amount where date >= SYSDATE() - INTERVAL 7 day order by date DESC;
    

    SYSDATE() returns the time at which the function executes and interval sets a time period between the given dates.
    It’s also better to optimize your queries and to get specific values off the database than to do "SELECT *"
    For example: SELECT Field1, Field2, Field3 from table;

    MySQL_ PHP functions are deprecated as well, so you shouldn’t use them anymore. I would stick to Mysqli or PDO prepared statements.

    If this doesn’t qualify as a correct answer to you, feel free to downvote.

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

Sidebar

Related Questions

I just can't get Multi Value settings to work in my Ipad app. This
I just can't get this query to work when updating records in a mySQL
I just can't figure a way to achieve this. I basically want to get
I just can't figure out, why this slidetoggle does't work. It just runs once:
I just can't get the ajax service to work. A simple class to $.get(http://google.com)
I just can't seem to get this API working. My eyes are missing the
I just can't seem to wrap my mind around this concept... I want to
I just can't work this one out. I have a table with a column
I just can't seem to get localization to work. I have a class library.
I just can't get around this. I am able to create a file with

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.