|
|
#1 |
|
Senior Member
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 239
Rep Power: 12 ![]() ![]() |
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) |
|
|
|
|
|
#2 |
|
Coder
Join Date: Mar 2006
Posts: 4,419
Rep Power: 108 ![]() ![]() |
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. |
|
|
|
|
|
#3 |
|
Coder
Join Date: Mar 2006
Posts: 4,419
Rep Power: 108 ![]() ![]() |
try.......
UPDATE class_listings SET expiration = DATE_ADD(expiration,INTERVAL 180 DAY) |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 239
Rep Power: 12 ![]() ![]() |
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) |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
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 |