Re: Recursive photo gallery removal problem.
| From: | Tom Reed | Date: | Fri, 26 Mar 2004 22:07:46 +0000 |
| Subject: | Re: Recursive photo gallery removal problem. | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-33660@lists.php.net to get a copy of this message | ||
No solutions or feedback?
:(
-Tom Reed
centrex@unifiedent.com
"Tom Reed" <tom@techropolis.com> wrote in message
news:20040325061258.56792.qmail@pb1.pair.com...
> I designed a photo gallery system, in which I allow users to create
> recursive photo "folders." The trouble I am having is being able to
delete
> a photo folder, and all folders/photos within it.
>
> Example structure:
>
> Main Folder
> - Folder 1
> - Folder a
> - Folder b
> - Folder i
> - Folder ii
> - Folder aa
> -Folder bb
> - Folder 2
> - Folder 2a
> ...
>
> I am having trouble creating code to delete all folders within the folder
> they choose to delete.
>
> Say I want to delete "Folder b." In addition to deleting "Folder b," the
> code also needs to delete folders "Folder i," "Folder ii," "Folder
> aa,"
and
> "Folder bb."
>
> Here's how I've setup the photo gallery table:
>
> CREATE TABLE
gallery (
> uniqueid int(11) unsigned default NULL,
> gallery int(11) default NULL,
> image varchar(255) default NULL,
> height int(11) default NULL,
> width int(11) default NULL,
> thumbnail varchar(255) default NULL,
> title varchar(150) default NULL,
> description text,
> location int(11) unsigned default NULL,
> uploaded_by int(11) default NULL
> ) TYPE=MyISAM;
>
> uniqueid is the id of the folder.
> gallery is the folder depth (0=photo, 0=main folder, 1=sub folder level 1,
> 2==sub folder level 2...)
> location is the folder this sub-folder is located in
>
> Seems this code may be fairly complex. I've made about three attempts,
with
> no success and I figured this would be the best place to ask.
>
> Any help would be appreciated.
>
> -Tom Reed
> centrex@unifiedent.com