/    Sign up×
Community /Pin to ProfileBookmark

phase record with like keyword

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.
?

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@LiLcRaZyFuZzYMar 15.2006 — You want to erase all entries from 2005 and older?
Copy linkTweet thisAlerts:
@chazzyMar 15.2006 — if the column is a date type, just convert it into its year portion and delete where the year portion = 2005

If you're using mysql: [URL=http://dev.mysql.com/doc/refman/4.1/en/date-and-time-functions.html]MySQL's date/time functions[/URL]
×

Success!

Help @pallabmondal123 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...