RE: [PHP] php, mysql, and method question

From: Date: Fri, 21 Mar 2003 02:48:59 +0000
Subject: RE: [PHP] php, mysql, and method question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-140529@lists.php.net to get a copy of this message
> i have a table that contains articles. i have another table which > contains the order 1 - 9 that i would like to display them in. > > this part is done, and is not a problem. here is where I am not sure > how to proceed. > > 1. tbl_display_order - can only have 9 records in it (or do i just > ignore anything beyond 9?) > 2. when a new article is added to tbl_display_order - it needs to get > the field that contains it's order set to 1 so it shows up first when I > display the articles, and all the other articles need to have their > order number incremented. > > Maybe there is a better way to do this? Just not sure. Maybe not with a > database at all? Can't you just add a TIMESTAMP column, ORDER BY that DESCending, and LIMIT to 9 results?? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

« previous php.general (#140529) next »