phase record with like keyword

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pallabmondal123
Forum Newbie
Posts: 1
Joined: Sat Feb 18, 2006 12:06 pm

phase record with like keyword

Post by pallabmondal123 »

I have a table name news . In which
one of field is date.The value of date
is putted by using mktime() function.
now i want to phase out the record
whose year 2005.

Example:
--------
(news)

id head date
-- ---- -----
1 A1 1124809860
2 A2 1134809862
3 A3 1125809865


how it is possible with help of like keyword in sql and php.
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Is your date field stored as TIMESTAMP ?
If so, then you can use the DATE_FORMAT.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

LIKE is not useful for this.

viewtopic.php?t=45528
Post Reply