FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Loop through array, change headings
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Loop through array, change headings [message #184436 is a reply to message #184435] Tue, 31 December 2013 23:00 Go to previous messageGo to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma:
Senior Member
On Tue, 31 Dec 2013 17:06:38 -0500, richard wrote:

> On Tue, 31 Dec 2013 21:08:42 +0000 (UTC), Adrienne Boswell wrote:

>> I have a table that has three classifications.

>> I have another table that has categories in each classification.

> Why not have one table?

Richard, you've proved time and time again that you have no understanding
of relational database design theory. Please stop trying to suggest that
people with sensibly designed databases should do it the stoopid way.

Adrienne's query joins the multiple tables into a single dataset and
sorts the dataset, the question asked was how to process that sorted
dataset in a specific manner. The question has nothing to do with the
structure of the data in the database, the answer lies solely in how the
result object returned by the mysql[i]->query() is processed.

Here's one example of why Adriennes approach is easier:

Supposing Adrienne decides to rename one of the three classifications. In
Adriennes database, that involves a single sql operation on one row in
one table. In your hypothetical and seriously fucked up database design,
you would need to test each row in the whole database to see if the
category was the one that needed to be changed, and then change it. Such
a process is highly inefficient in terms of both cpu effort, memory
management and disk io, and it is to prevent such inefficiencies amongst
other things that relational database design theory has evolved to where
it is today.

Unlike your comprehension of computer systems which appears to have
started at nothing and continues to devolve backwards.

--
Denis McMahon, denismfmcmahon(at)gmail(dot)com
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: thank you, richard@noreply
Next Topic: PHP sql entry is a godaweful mess
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 23:50:38 GMT 2024

Total time taken to generate the page: 0.03901 seconds