 | |  | | | Photopost Pro How Do I...? Wondering how to do things in PhotoPost? |
May 6th, 2009, 09:19 PM
|
#1 (permalink)
| | Junior Member Verified Customer
Join Date: Sep 2008
Posts: 9
| Need to delte comments from the DB
We have problem --one I caused so I don't expect support to fix it. But, if I could just figure out how to delete the comments in the gallery for a certain date range, it would solve our problem. But when I looked in the database it has the dates in a format that I am not able to understand. For instance, the digits in the database for May 4, 2009 9:25 am is 1241493949
So say I wanted to delete all the comments from February 15 to April 20, what would the dates look like in the comment table in the database?
If I were to go to the gallery and try to find them there it would take days and day as there are over 4,000 images and 6,000 comments to sort through.
|
| |
May 6th, 2009, 09:36 PM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
| Unix Time Stamp . com
You can put in dates there to get proper unixtimestamps.
Basically you have to do some query like this but we dont support anything like this.
DELETE FROM pp_comments WHERE date > LOWTIMESTAMP AND date < HIGHTIMESTAMP
Of course plug in your low and high range timestamps in that query and run in say phpmyadmin.
Last edited by Chuck S; May 6th, 2009 at 10:59 PM.
|
| |
May 6th, 2009, 09:41 PM
|
#3 (permalink)
| | Junior Member Verified Customer
Join Date: Sep 2008
Posts: 9
|
Sounds like the way to go. What what format would the timestamp need to be in? mm/dd/2009?
I was just going to sort them by date and find the beginning one and end one for that time period and delete all in between, but this sounds better.
|
| |
May 6th, 2009, 10:18 PM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
| Unix Time Stamp . com
To find a date or timestamp use the link above and then use the query I posted to delete things between the dates you want
|
| |
May 6th, 2009, 10:44 PM
|
#5 (permalink)
| | Junior Member Verified Customer
Join Date: Sep 2008
Posts: 9
|
OH--sorry did not notice the link. Will do.
Umm...are your signs off, the greater than and less than? Shouldn't it be the opposite? >lowertimestamp and >highertimestamp?
in other words greater than the low and less than the high?
|
| |
May 6th, 2009, 10:59 PM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
yes I fixed it
|
| |
May 6th, 2009, 11:04 PM
|
#7 (permalink)
| | Junior Member Verified Customer
Join Date: Sep 2008
Posts: 9
|
OK, I must not being the right thing. I am looking at a comment that is dated March 20, 2009 6:40 am
I got the timestamp for it and try to find it using the SQL command:
SELECT `pp_comments`.`date`
FROM pp_comments
WHERE (`pp_comments`.`date` =1237549200)
I get null results.
I realize this is beyond the scope of what this forum is here for though and understand that this mistake is MY problem so understand if you don't want to take this further.
|
| |
May 7th, 2009, 07:57 AM
|
#8 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
SELECT * FROM pp_comments WHERE date = 1237549200;
|
| |
May 7th, 2009, 11:36 PM
|
#9 (permalink)
| | Junior Member Verified Customer
Join Date: Sep 2008
Posts: 9
|
Thanks so much. This has solved the problems we have had!
|
| |
May 8th, 2009, 08:13 AM
|
#10 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
Have a good day.
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 12:49 PM. | |