PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |

Go Back   PhotoPost Community > PhotoPost Support > PhotoPost Pro Support Forums > Photopost Pro How Do I...?

Photopost Pro How Do I...? Wondering how to do things in PhotoPost?

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old February 4th, 2008, 05:19 PM   #1 (permalink)
Member
Verified Customer
 
Join Date: Jan 2008
Posts: 55
Question Deleting entries directly from the database? Stripping commas from keywords?

I had a user upload a ton of photos at once and it choked a couple times and uploaded some of them twice. I ran the dupe scanner and I think it got rid of most of them, but there are a few left. Can I go in to phpMyAdmin and delete their entries manually? Is that going to break anything?

Also, he entered keywords separated by commas and now the commas are considered part of each keyword. Is there a quick way to strip all the commas from that field? I'd assume a quick MySQL query would do it, but I don't know how to construct it.

Thanks.
styleforum is offline   Reply With Quote
Old February 4th, 2008, 07:19 PM   #2 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,683
You can delete photo inserts yes but thats not going to delete the actual photos

As far as commas on keywords HMM thats a powerful query so beware

UPDATE pp_photos SET keywords = REPLACE(keywords, ',','')
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old February 4th, 2008, 09:33 PM   #3 (permalink)
Member
Verified Customer
 
Join Date: Jan 2008
Posts: 55
Thanks Chuck, I thought it would be doable, just didn't know how to write the query.

Another question, can you tell me what's wrong with this query?

Code:
Content visible to verified customers only.
It breaks here and I'm not sure why. I'm having a hard time finding references that explain how to formulate queries.

I'm trying to return all keywords from all photos from certain categories that I specify. Later I might write it so that the array of categories is found by looking at the categories table to find children of a parent category, so I can say I want all keywords from a certain category and any children.

Thanks.
styleforum is offline   Reply With Quote
Old February 4th, 2008, 09:37 PM   #4 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,683
what is that keyword thing on the end that is not valid and is probally why the query fails.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old February 4th, 2008, 10:03 PM   #5 (permalink)
Member
Verified Customer
 
Join Date: Jan 2008
Posts: 55
That evaluates where keywords exist, basically. It does work in a simpler query. I think mine is failing because of "AND WHERE". When I took out WHERE it seems to be getting further along.

Last edited by styleforum; February 4th, 2008 at 10:18 PM.
styleforum is offline   Reply With Quote
Old February 5th, 2008, 08:55 AM   #6 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,683
SELECT keywords FROM {$Globals['pp_db_prefix']}photos WHERE cat IN (501,502,503,504)

Yep that would work.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old February 5th, 2008, 01:56 PM   #7 (permalink)
Member
Verified Customer
 
Join Date: Jan 2008
Posts: 55
Yeah, I ended up with:

SELECT keywords FROM {$Globals['pp_db_prefix']}photos WHERE keywords <> '' AND cat BETWEEN 512 AND 530

That works because the categories I wanted to pull from are all in a row from 512-530.
styleforum is offline   Reply With Quote
Old February 5th, 2008, 02:46 PM   #8 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,683
got ya
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
Adding categories directly to database leonK Classifieds How do I...? 1 March 10th, 2007 08:50 PM
Multiple entries in scheduled tasks (fixed) Metal-R-US Bugs - vBulletin 3.6x 6 October 21st, 2006 07:18 AM
Server error log entries firstrebel Photopost Pro Installation & Upgrades 2 February 7th, 2005 09:34 AM


All times are GMT -5. The time now is 02:43 AM.

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