contact list re-ordering (php/mySQL CMS design)
| From: | speedfreak at chello dot be | Date: | Sat, 07 Sep 2002 16:08:42 +0000 |
| Subject: | contact list re-ordering (php/mySQL CMS design) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-115610@lists.php.net to get a copy of this message | ||
Dear guru's,
Hit a problem while developing a CMS with php/mySQL. Part of this is a
contact list and this works ok (add/edit/delete with
insert/update/delete queries). Now the client has requested a new
feature: ability to change the order in which the contacts are being
presented in the public part of this CMS (don't ask me why). I've added
a field 'show_pos' to the contacts table and am able to change its value
when I edit an existing record or add a new one. What I can't wrap my
head around at the moment is how one deals with updating 'show_pos' for
the OTHER records (while editing/deleting present record (WHERE
id='$id')? Could anyone give me some pointers as to how this could be
done in php and/or SQL (preferable). I sure hope anyone understands what
I mean ...
Cheers!
newbie@a_loss