1
I have a query that has a condition, which checks whether the record is greater than or equal to today’s date.
He is like that:
WHERE t1.bidpack_buy_date => NOW()
Well, then he’ll check if the column value bidpack_buy_date
is greater than or equal to the current date and time.
In the column bidpack_buy_date
it gets recorded that way:
2018-01-10 09:00:00
I need that in this condition, it checks only the day, month and year. That is, it will be valid only if it is equal to today’s date or later, the time should be considered.
How can I do that?
But aia it will be separated, have to check the year, month and day in the same condition?
– Wendler
I edited the answer with that information too, Wendler! :)
– Cleber Griff
Can you tell me if I did it right, and if the query is correct?
– Wendler
DELETE t1 FROM bid_account t1 INNER JOIN bid_account t2 WHERE t1.id > t2.id AND t1.bidding_price = t2.bidding_price AND t1.auction_id = '" . $obj->auction_id . "' AND t1.bidding_type = 's' AND t1.bid_flag = 'd' AND DATE(t1.bidpack_buy_date) => DATE(NOW())
– Wendler
I think that’s how it is, Wendler! Make a copy of this table and make a test not to affect if you are in production rs
– Cleber Griff
It worked, Wendler?
– Cleber Griff
You did @Cleber Griff, thank you very much! =)
– Wendler