MySQL news database structure

From: Date: Fri, 05 Jul 2002 01:25:33 +0000
Subject: MySQL news database structure
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-105548@lists.php.net to get a copy of this message
Hi, i am writing a news management system in PHP, with comments, etc, and i am wondering if theres a better way of structuring the tables to increase speed and stability. This is how i am structuring my tables: Table 1 (news) ------------------------------ ID Date Author Title News Text Table 2 (comments) -------------------------------- ID News ID (to which news it belongs to) Date Author Comment text Everytime i want to show the comments on some news article, i have to do a query to the whole table 2, selecting the entries that have the "news ID" equal to the ID of the news i want. It works but is this ok for when i have hundreds of news/comments later on? Wont it slow down things? Is there an easier way for this news/comments script? Sorry if i am asking something weird, i am very new to this mysql/php stuff. Pag

« previous php.general (#105548) next »