Re: Categories like wordpress

From: Date: Thu, 01 May 2008 14:43:51 +0000
Subject: Re: Categories like wordpress
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-273780@lists.php.net to get a copy of this message
Is this how its done or am I barking up the wrong tree?
You have multiple options: 1. Fully normalised, where you have three tables - one for your "articles", one for your categories and a link table. 2. A "SET" MySQL datatype which will allow upto 32 predefined categories. 3. A simple CHAR type with the category names, (or if you use numeric IDs, you could have many more categories). The former is, IIRC, faster, but more work to implement. Whereas the latter two are very fast to implement but somewhat slower to query. For the last two cases the MySQL function FIND_IN_SET() will be very useful. -- Richard Heyes +----------------------------------------+ | Access SSH with a Windows mapped drive | | http://www.phpguru.org/sftpdrive | +----------------------------------------+

« previous php.general (#273780) next »