From Joomla! Documentation
Revision as of 08:32, 3 August 2010 by Nonos
The method loadAssocList is like an array of the loadAssoc for each row of the table.
Let's use "staalanden" table that was created on his tutorial Developing a Model-View-Controller Component - Part 3 - Using the Database
Fields were "ID" and "greeting", let's do a query like "select * from #__hello"
Array(=>Array([ID]=>1,[greeting]=>Hello, World!),=>Array([ID]=>2,[greeting]=>Bonjour, Monde!),=>Array([ID]=>3,[greeting]=>Ciao, Mondo!))
The method can get a parameter which must be a field name of the result query, it will change the array index into the field name of the row.