Support Forums


Go Back   68 Classifieds Forums > Help & Support > v4 Questions & Support

Notices

 
LinkBack Thread Tools Display Modes
Old 01-29-2009, 04:41 PM   #1
Senior Member
 
hel68c's Avatar
 
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 239
Rep Power: 12
hel68c is just really nicehel68c is just really nice
Default Add days to expiration

Hi,

I would like to add 180 days to all listings expiration date.

I tried with UPDATE class_listings expiration = 'expiration' + '180';

but it's not working.

Do you have some knowledge with SQL?
__________________
Serge
HobbyClassified.com
V4.08 Developper, Module installed (CIV Scam Filter, Maffo Location System, Maffo News, VBulletin Usershare)
hel68c is offline   Reply With Quote
Old 01-29-2009, 04:49 PM   #2
Coder
 
Join Date: Mar 2006
Posts: 4,419
Rep Power: 108
Lhotch is just really niceLhotch is just really nice
Default

I dont have the answer off the top of my head, but I can tell you that you just cant haphazardly add a number to the value of a field.

For starters, the expiration date is set as a specific date and time and its stored as a column type of datetime.
__________________
Larry.
Lhotch is offline   Reply With Quote
Old 01-29-2009, 04:52 PM   #3
Coder
 
Join Date: Mar 2006
Posts: 4,419
Rep Power: 108
Lhotch is just really niceLhotch is just really nice
Default

try.......

UPDATE class_listings SET expiration = DATE_ADD(expiration,INTERVAL 180 DAY)
__________________
Larry.
Lhotch is offline   Reply With Quote
Old 01-29-2009, 05:01 PM   #4
Senior Member
 
hel68c's Avatar
 
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 239
Rep Power: 12
hel68c is just really nicehel68c is just really nice
Default

Right on. Lhotch your the best.

Thanks!
__________________
Serge
HobbyClassified.com
V4.08 Developper, Module installed (CIV Scam Filter, Maffo Location System, Maffo News, VBulletin Usershare)
hel68c is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Expire users after x days of inactivity pauljr v3.1 Modules & Modifications 3 01-22-2008 02:21 PM
Expiration >365 CB v3.1 Questions & Support 6 03-17-2007 11:19 PM
I Just opened this site a few days ago... zman78 Site Critiques 4 05-12-2006 10:19 AM
calculate days left before expiry farnott v3.0 Questions & Support 4 05-10-2006 07:18 PM


All times are GMT -4. The time now is 06:35 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0