<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mkopinsky</id>
	<title>Joomla! Documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.sandbox.joomla.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mkopinsky"/>
	<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/Special:Contributions/Mkopinsky"/>
	<updated>2026-05-23T10:45:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=Accessing_the_database_using_JDatabase&amp;diff=20888</id>
		<title>Accessing the database using JDatabase</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=Accessing_the_database_using_JDatabase&amp;diff=20888"/>
		<updated>2009-12-24T01:06:18Z</updated>

		<summary type="html">&lt;p&gt;Mkopinsky: /* Preparing the query */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Joomla provides a sophisticated database abstraction layer to simplify the usage for 3PD. This guide should help you using this layer.&lt;br /&gt;
&lt;br /&gt;
==Why should I use the Joomla database class?==&lt;br /&gt;
Joomla has been built with the ability to use several different kinds of SQL-database-systems and to run in a variety of environments with different table-prefixes. In addition to these functions, the class automatically creates the database connection. Besides instantiating the object, at a minimum, you only need 2 lines of code to get a result from the database in a variety of formats. Using the Joomla database layer ensures a maximum of compatibility and flexibility for your extension.&lt;br /&gt;
&lt;br /&gt;
==Preparing the query==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
// Get a database object&lt;br /&gt;
$db =&amp;amp; JFactory::getDBO();&lt;br /&gt;
&lt;br /&gt;
$query = &amp;quot;SELECT * FROM #__example_table WHERE id = 999999;&amp;quot;;&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First we instantiate the database object, then we prepare the query. You can use the normal SQL-syntax, the only thing you have to change is the table-prefix. To make this as flexible as possible, Joomla uses a placeholder for the prefix, the &amp;amp;ldquo;#__&amp;amp;rdquo;. In the next step, the $db-&amp;gt;setQuery(), this string is replaced with the correct prefix.&lt;br /&gt;
&lt;br /&gt;
Now, if we don&#039;t want to get information from the database, but insert a row into it, we need one more function. Every string-value in the SQL-syntax should be quoted. For example, MySQL uses backticks &amp;amp;#096;&amp;amp;#096; for names and single quotes &amp;amp;lsquo;&amp;amp;lsquo; for values. Joomla has some functions to do this for us and to ensure code compatibility between different databases. We can pass the names to the function $db-&amp;gt;nameQuote($name) and the values to the function $db-&amp;gt;Quote($value). &lt;br /&gt;
&lt;br /&gt;
A fully quoted query example is:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query = &amp;quot;&lt;br /&gt;
  SELECT * &lt;br /&gt;
    FROM &amp;quot;.$db-&amp;gt;nameQuote(&#039;#__example_table&#039;).&amp;quot;  &lt;br /&gt;
    WHERE &amp;quot;.$db-&amp;gt;nameQuote(&#039;id&#039;).&amp;quot; = &amp;quot;.$db-&amp;gt;quote(&#039;999999&#039;).&amp;quot;;&lt;br /&gt;
  &amp;quot;;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Whatever we want to do, we have to set the query with the $db-&amp;gt;setQuery() function. Although you could write the query directly as a parameter for $db-&amp;gt;setQuery(), it&#039;s commonly done by first saving it in a variable, normally $query, and then handing this variable over. This helps writing clean, readable code.&lt;br /&gt;
&lt;br /&gt;
==== setQuery($query) ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;setQuery($query)&#039;&#039; method sets up a database query for later execution either by the query() method or one of the Load result methods.  &amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$db =&amp;amp; JFactory::getDBO();&lt;br /&gt;
$query = &amp;quot;/* some valid sql string */&amp;quot;;&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
The parameter $query must be a valid sql string, it can either be added as a string parameter or as a variable; generally a variable is preferred as it leads to more legible code and can help in debugging.&lt;br /&gt;
&lt;br /&gt;
setQuery() also takes three other parameters: $offset, $limit - both used in list pagination; and $prefix - an alternative table prefix. All three of these variables have default values set and can usually be ignored.&lt;br /&gt;
&lt;br /&gt;
==Executing the Query==&lt;br /&gt;
To execute the query, Joomla provides several functions, which differ in their return value.&lt;br /&gt;
&lt;br /&gt;
=== Basic Query Execution ===&lt;br /&gt;
&lt;br /&gt;
==== query() ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;query()&#039;&#039; method is the the basic tool for executing sql queries on a database. In Joomla it is most often used for updating or administering the database simple because the various load methods detail on this page have the query step built in to them.&lt;br /&gt;
&lt;br /&gt;
The syntax is very straightforward:&amp;lt;pre&amp;gt;$db =&amp;amp; JFactory::getDBO();&lt;br /&gt;
$query = &amp;quot;/* some valid sql string */&amp;quot;;&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$result = $db-&amp;gt;query();&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: $query() returns an appropriate database resource if successful, or FALSE if not&lt;br /&gt;
&lt;br /&gt;
=== Query Execution Information ===&lt;br /&gt;
* getAffectedRows()&lt;br /&gt;
* explain()&lt;br /&gt;
* insertid()&lt;br /&gt;
&lt;br /&gt;
=== Insert Query Execution ===&lt;br /&gt;
* insertObject()&lt;br /&gt;
&lt;br /&gt;
==Query Results ==&lt;br /&gt;
The database class contains many methods for working with a query&#039;s result set.&lt;br /&gt;
&lt;br /&gt;
=== Single Value Result ===&lt;br /&gt;
&lt;br /&gt;
==== loadResult() ====&lt;br /&gt;
&lt;br /&gt;
Use &#039;&#039;&#039;loadResult()&#039;&#039;&#039; when you expect just a single value back from your database query. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! id !! name !! email !! username&lt;br /&gt;
|- &lt;br /&gt;
| 1 || style=&amp;quot;background:yellow&amp;quot; | John Smith || johnsmith@example.com || johnsmith&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Magda Hellman || magda_h@example.com || magdah&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Yvonne de Gaulle || ydg@example.com || ydegaulle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is often the result of a &#039;count&#039; query to get a number of records:&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
$db =&amp;amp; JFactory::getDBO();&lt;br /&gt;
$query = &amp;quot;&lt;br /&gt;
  SELECT COUNT(*)&lt;br /&gt;
    FROM &amp;quot;.$db-&amp;gt;nameQuote(&#039;#__my_table&#039;).&amp;quot;&lt;br /&gt;
    WHERE &amp;quot;.$db-&amp;gt;nameQuote(&#039;name&#039;).&amp;quot; = &amp;quot;.$db-&amp;gt;quote($value).&amp;quot;;&lt;br /&gt;
  &amp;quot;;&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$count = $db-&amp;gt;loadResult();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
or where you are just looking for a single field from a single row of the table (or possibly a single field from the first row returned).&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
$db =&amp;amp; JFactory::getDBO();&lt;br /&gt;
$query = &amp;quot;&lt;br /&gt;
  SELECT &amp;quot;.$db-&amp;gt;nameQuote(&#039;field_name&#039;).&amp;quot;&lt;br /&gt;
    FROM &amp;quot;.$db-&amp;gt;nameQuote(&#039;#__my_table&#039;).&amp;quot;&lt;br /&gt;
    WHERE &amp;quot;.$db-&amp;gt;nameQuote(&#039;some_name&#039;).&amp;quot; = &amp;quot;.$db-&amp;gt;quote($some_value).&amp;quot;;&lt;br /&gt;
  &amp;quot;;&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$result = $db-&amp;gt;loadResult();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Single Row Results ===&lt;br /&gt;
&lt;br /&gt;
Each of these results functions will return a single record from the database even though there may be several records that meet the criteria that you have set. To get more records you need to call the function again.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! id !! name !! email !! username&lt;br /&gt;
|- style=&amp;quot;background:yellow&amp;quot;&lt;br /&gt;
| 1 || John Smith || johnsmith@example.com || johnsmith&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Magda Hellman || magda_h@example.com || magdah&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Yvonne de Gaulle || ydg@example.com || ydegaulle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== loadRow() ====&lt;br /&gt;
&lt;br /&gt;
loadRow() returns an indexed array from a single record in the table: &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadRow();&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( [0] =&amp;gt; 1 [1] =&amp;gt; John Smith [2] =&amp;gt; johnsmith@example.com [3] =&amp;gt; johnsmith ) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;] // e.g. $row[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The array indices are numeric starting from zero.&lt;br /&gt;
# Whilst you can repeat the call to get further rows, one of the functions that returns multiple rows might be more useful&lt;br /&gt;
&lt;br /&gt;
==== loadAssoc() ====&lt;br /&gt;
&lt;br /&gt;
loadAssoc() returns an associated array from a single record in the table: &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadAssoc();&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( [id] =&amp;gt; 1 [name] =&amp;gt; John Smith [email] =&amp;gt; johnsmith@example.com [username] =&amp;gt; johnsmith )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;name&#039;] // e.g. $row[&#039;name&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Whilst you can repeat the call to get further rows, one of the functions that returns multiple rows might be more useful&lt;br /&gt;
&lt;br /&gt;
==== loadObject() ====&lt;br /&gt;
&lt;br /&gt;
loadObject returns a PHP object from a single record in the table: &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$result = $db-&amp;gt;loadObject();&lt;br /&gt;
print_r($result);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;stdClass Object ( [id] =&amp;gt; 1 [name] =&amp;gt; John Smith [email] =&amp;gt; johnsmith@example.com [username] =&amp;gt; johnsmith )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual values by using:&amp;lt;pre&amp;gt;$row-&amp;gt;index // e.g. $row-&amp;gt;email&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# Whilst you can repeat the call to get further rows, one of the functions that returns multiple rows might be more useful&lt;br /&gt;
&lt;br /&gt;
===Single Column Results ===&lt;br /&gt;
&lt;br /&gt;
Each of these results functions will return a single column from the database. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! id !! name !! email !! username&lt;br /&gt;
|- &lt;br /&gt;
| 1 || style=&amp;quot;background:yellow&amp;quot; | John Smith || johnsmith@example.com || johnsmith&lt;br /&gt;
|-&lt;br /&gt;
| 2 || style=&amp;quot;background:yellow&amp;quot; | Magda Hellman || magda_h@example.com || magdah&lt;br /&gt;
|-&lt;br /&gt;
| 3 || style=&amp;quot;background:yellow&amp;quot; | Yvonne de Gaulle || ydg@example.com || ydegaulle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== loadResultArray() ====&lt;br /&gt;
&lt;br /&gt;
loadResultArray() returns an indexed array from a single column in the table: &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
$query = &amp;quot;&lt;br /&gt;
  SELECT name, email, username&lt;br /&gt;
    FROM . . . &amp;quot;;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$column= $db-&amp;gt;loadResultArray();&lt;br /&gt;
print_r($column);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( [0] =&amp;gt; John Smith [1] =&amp;gt; Magda Hellman [2] =&amp;gt; Yvonne de Gaulle )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual values by using:&amp;lt;pre&amp;gt;$column[&#039;index&#039;] // e.g. $column[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The array indices are numeric starting from zero.&lt;br /&gt;
# loadResultArray() is equivalent to loadResultArray(0)&lt;br /&gt;
&lt;br /&gt;
==== loadResultArray($index) ====&lt;br /&gt;
&lt;br /&gt;
loadResultArray($index) returns an indexed array from a single column in the table: &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
$query = &amp;quot;&lt;br /&gt;
  SELECT name, email, username&lt;br /&gt;
    FROM . . . &amp;quot;;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$column= $db-&amp;gt;loadResultArray(1);&lt;br /&gt;
print_r($column);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( [0] =&amp;gt; johnsmith@example.com [1] =&amp;gt; magda_h@example.com [2] =&amp;gt; ydg@example.com )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual values by using:&amp;lt;pre&amp;gt;$column[&#039;index&#039;] // e.g. $column[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
loadResultArray($index) allows you to iterate through a series of columns in the results&lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
for ( $i = 0; $i &amp;lt;= 2; $i++ ) {&lt;br /&gt;
  $column= $db-&amp;gt;loadResultArray($i);&lt;br /&gt;
  print_r($column);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give:&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( [0] =&amp;gt; John Smith [1] =&amp;gt; Magda Hellman [2] =&amp;gt; Yvonne de Gaulle )&lt;br /&gt;
Array ( [0] =&amp;gt; johnsmith@example.com [1] =&amp;gt; magda_h@example.com [2] =&amp;gt; ydg@example.com )&lt;br /&gt;
Array ( [0] =&amp;gt; johnsmith [1] =&amp;gt; magdah [2] =&amp;gt; ydegaulle )&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The array indices are numeric starting from zero.&lt;br /&gt;
&lt;br /&gt;
=== Multi-Row Results ===&lt;br /&gt;
&lt;br /&gt;
Each of these results functions will return multiple records from the database. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align:center&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! id !! name !! email !! username&lt;br /&gt;
|- style=&amp;quot;background:yellow&amp;quot;&lt;br /&gt;
| 1 || John Smith || johnsmith@example.com || johnsmith&lt;br /&gt;
|- style=&amp;quot;background:yellow&amp;quot;&lt;br /&gt;
| 2 || Magda Hellman || magda_h@example.com || magdah&lt;br /&gt;
|- style=&amp;quot;background:yellow&amp;quot;&lt;br /&gt;
| 3 || Yvonne de Gaulle || ydg@example.com || ydegaulle&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== loadRowList() ====&lt;br /&gt;
&lt;br /&gt;
loadRowList() returns an indexed array of indexed arrays from the table records returned by the query: &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadRowList();&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[0] =&amp;gt; Array ( [0] =&amp;gt; 1 [1] =&amp;gt; John Smith [2] =&amp;gt; johnsmith@example.com [3] =&amp;gt; johnsmith ) &lt;br /&gt;
[1] =&amp;gt; Array ( [0] =&amp;gt; 2 [1] =&amp;gt; Magda Hellman [2] =&amp;gt; magda_h@example.com [3] =&amp;gt; magdah ) &lt;br /&gt;
[2] =&amp;gt; Array ( [0] =&amp;gt; 3 [1] =&amp;gt; Yvonne de Gaulle [2] =&amp;gt; ydg@example.com [3] =&amp;gt; ydegaulle ) &lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual rows by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;] // e.g. $row[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
and you can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;][&#039;index&#039;] // e.g. $row[&#039;2&#039;][&#039;3&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
# The array indices are numeric starting from zero.&lt;br /&gt;
&lt;br /&gt;
==== loadAssocList() ====&lt;br /&gt;
&lt;br /&gt;
loadAssocList() returns an indexed array of associated arrays from the table records returned by the query: &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadAssocList();&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[0] =&amp;gt; Array ( [id] =&amp;gt; 1 [name] =&amp;gt; John Smith [email] =&amp;gt; johnsmith@example.com [username] =&amp;gt; johnsmith ) &lt;br /&gt;
[1] =&amp;gt; Array ( [id] =&amp;gt; 2 [name] =&amp;gt; Magda Hellman [email] =&amp;gt; magda_h@example.com [username] =&amp;gt; magdah ) &lt;br /&gt;
[2] =&amp;gt; Array ( [id] =&amp;gt; 3 [name] =&amp;gt; Yvonne de Gaulle [email] =&amp;gt; ydg@example.com [username] =&amp;gt; ydegaulle ) &lt;br /&gt;
) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual rows by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;] // e.g. $row[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
and you can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;][&#039;column_name&#039;] // e.g. $row[&#039;2&#039;][&#039;email&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== loadAssocList($key) ====&lt;br /&gt;
&lt;br /&gt;
loadAssocList(&#039;key&#039;) returns an associated array - indexed on &#039;key&#039; - of associated arrays from the table records returned by the query: &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadAssocList(&#039;username&#039;);&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[johnsmith] =&amp;gt; Array ( [id] =&amp;gt; 1 [name] =&amp;gt; John Smith [email] =&amp;gt; johnsmith@example.com [username] =&amp;gt; johnsmith ) &lt;br /&gt;
[magdah] =&amp;gt; Array ( [id] =&amp;gt; 2 [name] =&amp;gt; Magda Hellman [email] =&amp;gt; magda_h@example.com [username] =&amp;gt; magdah ) &lt;br /&gt;
[ydegaulle] =&amp;gt; Array ( [id] =&amp;gt; 3 [name] =&amp;gt; Yvonne de Gaulle [email] =&amp;gt; ydg@example.com [username] =&amp;gt; ydegaulle ) &lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual rows by using:&amp;lt;pre&amp;gt;$row[&#039;key_value&#039;] // e.g. $row[&#039;johnsmith&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
and you can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;key_value&#039;][&#039;column_name&#039;] // e.g. $row[&#039;johnsmith&#039;][&#039;email&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Key must be a valid column name from the table; it does not have to be an Index or a Primary Key. But if it does not have a unique value you may not be able to retrieve results reliably.&lt;br /&gt;
&lt;br /&gt;
==== loadObjectList() ====&lt;br /&gt;
&lt;br /&gt;
loadObjectList() returns an indexed array of PHP objects from the table records returned by the query: &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$result = $db-&amp;gt;loadObjectList();&lt;br /&gt;
print_r($result);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[0] =&amp;gt; stdClass Object ( [id] =&amp;gt; 1 [name] =&amp;gt; John Smith &lt;br /&gt;
    [email] =&amp;gt; johnsmith@example.com [username] =&amp;gt; johnsmith ) &lt;br /&gt;
[1] =&amp;gt; stdClass Object ( [id] =&amp;gt; 2 [name] =&amp;gt; Magda Hellman &lt;br /&gt;
    [email] =&amp;gt; magda_h@example.com [username] =&amp;gt; magdah ) &lt;br /&gt;
[2] =&amp;gt; stdClass Object ( [id] =&amp;gt; 3 [name] =&amp;gt; Yvonne de Gaulle &lt;br /&gt;
    [email] =&amp;gt; ydg@example.com [username] =&amp;gt; ydegaulle ) &lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual rows by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;] // e.g. $row[&#039;2&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
and you can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;index&#039;]-&amp;gt;name // e.g. $row[&#039;2&#039;]-&amp;gt;email&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== loadObjectList(&#039;key&#039;) ====&lt;br /&gt;
&lt;br /&gt;
loadObjectList($key) returns an associated array - indexed on &#039;key&#039; - of objects from the table records returned by the query: &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$row = $db-&amp;gt;loadObjectList(&#039;username&#039;);&lt;br /&gt;
print_r($row);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will give (with line breaks added for clarity):&lt;br /&gt;
&amp;lt;pre&amp;gt;Array ( &lt;br /&gt;
[johnsmith] =&amp;gt; stdClass Object ( [id] =&amp;gt; 1 [name] =&amp;gt; John Smith &lt;br /&gt;
    [email] =&amp;gt; johnsmith@example.com [username] =&amp;gt; johnsmith ) &lt;br /&gt;
[magdah] =&amp;gt; stdClass Object ( [id] =&amp;gt; 2 [name] =&amp;gt; Magda Hellman &lt;br /&gt;
    [email] =&amp;gt; magda_h@example.com [username] =&amp;gt; magdah ) &lt;br /&gt;
[ydegaulle] =&amp;gt; stdClass Object ( [id] =&amp;gt; 3 [name] =&amp;gt; Yvonne de Gaulle &lt;br /&gt;
    [email] =&amp;gt; ydg@example.com [username] =&amp;gt; ydegaulle ) &lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can access the individual rows by using:&amp;lt;pre&amp;gt;$row[&#039;key_value&#039;] // e.g. $row[&#039;johnsmith&#039;]&amp;lt;/pre&amp;gt;&lt;br /&gt;
and you can access the individual values by using:&amp;lt;pre&amp;gt;$row[&#039;key_value&#039;]-&amp;gt;column_name // e.g. $row[&#039;johnsmith&#039;]-&amp;gt;email&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Key must be a valid column name from the table; it does not have to be an Index or a Primary Key. But if it does not have a unique value you may not be able to retrieve results reliably.&lt;br /&gt;
&lt;br /&gt;
=== Misc Result Set Methods ===&lt;br /&gt;
&lt;br /&gt;
==== getNumRows() ====&lt;br /&gt;
&lt;br /&gt;
getNumRows() will return the number of result rows found by the last query and waiting to be read. To get a result from getNumRows() you have to run it &#039;&#039;&#039;after&#039;&#039;&#039; the query and &#039;&#039;&#039;before&#039;&#039;&#039; you have retrieved any results.  &lt;br /&gt;
&amp;lt;source lang=&#039;php&#039;&amp;gt;&lt;br /&gt;
. . .&lt;br /&gt;
$db-&amp;gt;setQuery($query);&lt;br /&gt;
$db-&amp;gt;query();&lt;br /&gt;
$num_rows = $db-&amp;gt;getNumRows();&lt;br /&gt;
print_r($num_rows);&lt;br /&gt;
$result = $db-&amp;gt;loadRowList();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
will return &amp;lt;pre&amp;gt;3&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: if you run getNumRows() after loadRowList() - or any other retrieval method - you may get a PHP Warning:&lt;br /&gt;
&amp;lt;pre&amp;gt;Warning: mysql_num_rows(): 80 is not a valid MySQL result resource &lt;br /&gt;
in D:\xampp\htdocs\joomla1.5a\libraries\joomla\database\database\mysql.php on line 344&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tips, Tricks &amp;amp; FAQ==&lt;br /&gt;
We had a few people lately using sub-queries like these:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;SQL&amp;quot;&amp;gt;&lt;br /&gt;
SELECT * FROM #__example WHERE id IN (SELECT * FROM #__example2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
These kind of queries are only possible in MySQL 4.1 and above. Another way to achieve this, is splitting the query into two:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$query = &amp;quot;SELECT * FROM #__example2&amp;quot;;&lt;br /&gt;
$database-&amp;gt;setQuery($query);&lt;br /&gt;
$query = &amp;quot;SELECT * FROM #__example WHERE id IN (&amp;quot;. implode(&amp;quot;,&amp;quot;, $database-&amp;gt;loadArray()) .&amp;quot;)&amp;quot;;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Development]][[Category:Database]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mkopinsky</name></author>
	</entry>
	<entry>
		<id>https://docs.sandbox.joomla.org/index.php?title=J1.5:Developing_a_MVC_Component/Using_the_Database&amp;diff=20887</id>
		<title>J1.5:Developing a MVC Component/Using the Database</title>
		<link rel="alternate" type="text/html" href="https://docs.sandbox.joomla.org/index.php?title=J1.5:Developing_a_MVC_Component/Using_the_Database&amp;diff=20887"/>
		<updated>2009-12-23T21:24:50Z</updated>

		<summary type="html">&lt;p&gt;Mkopinsky: /* Creating the Installation SQL File */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
In the first two tutorials, we showed you how to build a simple model-view-controller component. We had one view which retrieved data from a model (which was created in the 2nd tutorial). In this tutorial, we will be working with the model. Instead of the data being hard coded in the model, the model will retrieve the data from a table in the database.&lt;br /&gt;
&lt;br /&gt;
This tutorial will demonstrate how to use the JDatabase class to retrieve data from the database.&lt;br /&gt;
&lt;br /&gt;
== Retrieving the Data ==&lt;br /&gt;
&lt;br /&gt;
Our model currently has one method: getGreeting(). This method is very simple - all it does is return the hard-coded greeting.&lt;br /&gt;
&lt;br /&gt;
To make things more interesting, we will load the greeting from a database table. We will demonstrate later how to create an SQL file and add the appropriate code to the XML manifest file so that the table and some sample data will be created when the component is installed. For now, we will simply replace our return statement with some code that will retrieve the greeting from the database and return it.&lt;br /&gt;
&lt;br /&gt;
The first step is to obtain a reference to a database object. Since Joomla! uses the database for its normal operation, a database connection already exists; therefore, it is not necessary to create your own. A reference to the existing database can be obtained using:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;$db =&amp;amp; JFactory::getDBO();&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
JFactory is a static class that is used to retrieve references to many of the system objects. More information about this class can be found in the API documentation [http://docs.joomla.org/JFactory JFactoryAPI].&lt;br /&gt;
&lt;br /&gt;
The method name (getDBO) stands for get DataBase Object, and is easy and important to remember.&lt;br /&gt;
&lt;br /&gt;
Now that we have obtained a reference to the database object, we can retrieve our data. We do this in two steps:&lt;br /&gt;
&lt;br /&gt;
* store our query in the database object&lt;br /&gt;
* load the result&lt;br /&gt;
&lt;br /&gt;
Our new getGreeting() method will therefore look like:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;function getGreeting()&lt;br /&gt;
{&lt;br /&gt;
   $db =&amp;amp; JFactory::getDBO();&lt;br /&gt;
&lt;br /&gt;
   $query = &#039;SELECT greeting FROM #__hello&#039;;&lt;br /&gt;
   $db-&amp;gt;setQuery( $query );&lt;br /&gt;
   $greeting = $db-&amp;gt;loadResult();&lt;br /&gt;
&lt;br /&gt;
   return $greeting;&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
hello is the name of the table that we will create later, and greeting is the name of the field that stores the greetings. If you are not familiar with SQL, it would be helpful to take a tutorial or a lesson to get yourself up to speed. One such tutorial can be found at [http://www.w3schools.com/sql/default.asp w3schools].&lt;br /&gt;
&lt;br /&gt;
The $db-&amp;gt;loadResult() method will execute the stored database query and return the first field of the first row of the result. See [http://api.joomla.org/Joomla-Framework/Database/JDatabase.html JDatabase API reference] for more information about other load methods in the JDatabase class.&lt;br /&gt;
&lt;br /&gt;
== Creating the Installation SQL File ==&lt;br /&gt;
&lt;br /&gt;
The Joomla! installer has built-in support for executing queries during component installation. These queries are all stored in a standard text file.&lt;br /&gt;
&lt;br /&gt;
We will have three queries in our install file: the first will drop the table in case it already exists, the second will create the table with the appropriate fields, and the third will insert the data.&lt;br /&gt;
&lt;br /&gt;
Here are our queries:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;source lang=&amp;quot;mysql&amp;quot;&amp;gt;DROP TABLE IF EXISTS `#__hello`;&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE `#__hello` (&lt;br /&gt;
  `id` int(11) unsigned NOT NULL auto_increment,&lt;br /&gt;
  `greeting` varchar(25) NOT NULL,&lt;br /&gt;
  PRIMARY KEY  (`id`)&lt;br /&gt;
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;&lt;br /&gt;
&lt;br /&gt;
INSERT INTO `#__hello` (`greeting`) VALUES (&#039;Hello, World!&#039;), (&#039;Bonjour, Monde!&#039;), (&#039;Ciao, Mondo!&#039;);&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You might find the  prefix on the table names rather odd. Joomla! will replace this prefix with the prefix used by the current install. For most installs, this table will become jos_hello. This allows multiple installs of Joomla! to use the same database, and prevents collisions with other applications using the same table names (i.e. two applications might share a database, but might both require a &#039;users&#039; table. This convention avoids problems.)&lt;br /&gt;
&lt;br /&gt;
We have specified two fields in our database. The first field is id, and is called the &#039;primary key&#039;. The primary key of a database table is a field that is used to uniquely identify a record. This is often used to lookup rows in the database. The other field is greeting. This is the field that stores the greeting that is returned from the query that we used above.&lt;br /&gt;
&lt;br /&gt;
We will save our installation queries in a file called install.sql. (Note: In the original version of this file, install.utf.sql was used - this was incorrect. Also see [[Talk:Developing_a_Model-View-Controller_Component_-_Part_3_-_Using_the_Database | discussion]].)&lt;br /&gt;
&lt;br /&gt;
=== Creating the Uninstall SQL File ===&lt;br /&gt;
&lt;br /&gt;
Though we might hope that people will never want to &amp;quot;uninstall&amp;quot; our component, it is important that if they do, nothing is left behind after uninstalling our component. Joomla! will look after deleting the files and directories that were created during the &amp;quot;install&amp;quot;, but we must manually include queries that will remove any tables that were added to the database. Since we have only created one table, we only need one query:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;source lang=&amp;quot;mysql&amp;quot;&amp;gt;DROP TABLE IF EXISTS `#__hello`;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will save this uninstall query in a file called uninstall.sql. (Note: In the original version of this file, uninstall.utf.sql was used - this was incorrect. Also see [[Talk:Developing_a_Model-View-Controller_Component_-_Part_3_-_Using_the_Database | discussion]].)&lt;br /&gt;
&lt;br /&gt;
== Updating our Install File ==&lt;br /&gt;
&lt;br /&gt;
We need to change a few things in our install.xml file. First, we need to add our two new sql files to the list of files to install. Secondly, the SQL install files have to be placed in the admin directory. Thirdly, we need to tell the installer to execute the queries in our files on install and uninstall.&lt;br /&gt;
&lt;br /&gt;
Our new file looks like this:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;install type=&amp;quot;component&amp;quot; version=&amp;quot;1.5.0&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;name&amp;gt;Hello&amp;lt;/name&amp;gt;&lt;br /&gt;
 &amp;lt;!-- The following elements are optional and free of formatting conttraints --&amp;gt;&lt;br /&gt;
 &amp;lt;creationDate&amp;gt;2007-02-22&amp;lt;/creationDate&amp;gt;&lt;br /&gt;
 &amp;lt;author&amp;gt;John Doe&amp;lt;/author&amp;gt;&lt;br /&gt;
 &amp;lt;authorEmail&amp;gt;john.doe@example.org&amp;lt;/authorEmail&amp;gt;&lt;br /&gt;
 &amp;lt;authorUrl&amp;gt;http://www.example.org&amp;lt;/authorUrl&amp;gt;&lt;br /&gt;
 &amp;lt;copyright&amp;gt;Copyright Info&amp;lt;/copyright&amp;gt;&lt;br /&gt;
 &amp;lt;license&amp;gt;License Info&amp;lt;/license&amp;gt;&lt;br /&gt;
 &amp;lt;!--  The version string is recorded in the components table --&amp;gt;&lt;br /&gt;
 &amp;lt;version&amp;gt;3.01&amp;lt;/version&amp;gt;&lt;br /&gt;
 &amp;lt;!-- The description is optional and defaults to the name --&amp;gt;&lt;br /&gt;
 &amp;lt;description&amp;gt;Description of the component ...&amp;lt;/description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!-- Site Main File Copy Section --&amp;gt;&lt;br /&gt;
 &amp;lt;!-- Note the folder attribute: This attribute describes the folder&lt;br /&gt;
      to copy FROM in the package to install therefore files copied&lt;br /&gt;
      in this section are copied from /site/ in the package --&amp;gt;&lt;br /&gt;
 &amp;lt;files folder=&amp;quot;site&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;filename&amp;gt;controller.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
  &amp;lt;filename&amp;gt;hello.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
  &amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
  &amp;lt;filename&amp;gt;models/hello.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
  &amp;lt;filename&amp;gt;models/index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
  &amp;lt;filename&amp;gt;views/index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
  &amp;lt;filename&amp;gt;views/hello/index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
  &amp;lt;filename&amp;gt;views/hello/view.html.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
  &amp;lt;filename&amp;gt;views/hello/tmpl/default.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
  &amp;lt;filename&amp;gt;views/hello/tmpl/index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
 &amp;lt;/files&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;install&amp;gt;&lt;br /&gt;
  &amp;lt;sql&amp;gt;&lt;br /&gt;
    &amp;lt;file charset=&amp;quot;utf8&amp;quot; driver=&amp;quot;mysql&amp;quot;&amp;gt;install.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
  &amp;lt;/sql&amp;gt;&lt;br /&gt;
 &amp;lt;/install&amp;gt;&lt;br /&gt;
 &amp;lt;uninstall&amp;gt;&lt;br /&gt;
  &amp;lt;sql&amp;gt;&lt;br /&gt;
    &amp;lt;file charset=&amp;quot;utf8&amp;quot; driver=&amp;quot;mysql&amp;quot;&amp;gt;uninstall.sql&amp;lt;/file&amp;gt;&lt;br /&gt;
  &amp;lt;/sql&amp;gt;&lt;br /&gt;
 &amp;lt;/uninstall&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
 &amp;lt;administration&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Administration Menu Section --&amp;gt;&lt;br /&gt;
  &amp;lt;menu&amp;gt;Hello World!&amp;lt;/menu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;!-- Administration Main File Copy Section --&amp;gt;&lt;br /&gt;
  &amp;lt;files folder=&amp;quot;admin&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;filename&amp;gt;hello.php&amp;lt;/filename&amp;gt;&lt;br /&gt;
   &amp;lt;filename&amp;gt;index.html&amp;lt;/filename&amp;gt;&lt;br /&gt;
   &amp;lt;filename&amp;gt;install.sql&amp;lt;/filename&amp;gt;&lt;br /&gt;
   &amp;lt;filename&amp;gt;uninstall.sql&amp;lt;/filename&amp;gt;&lt;br /&gt;
  &amp;lt;/files&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/administration&amp;gt;&lt;br /&gt;
&amp;lt;/install&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will notice two attributes present on the &amp;lt;file&amp;gt; tags within the &amp;lt;install&amp;gt; and &amp;lt;uninstall&amp;gt; sections: charset and driver. The charset is the type of charset to use. The only valid charset is utf8. If you want to create install files for non-utf8 databases (for older version of MySQL), you should omit this attribute.&lt;br /&gt;
&lt;br /&gt;
The driver attribute specifies which database the queries were written for. Currently, this can only be mysql, but in future versions of Joomla! there may be more database drivers available.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
We now have a component that takes advantage of both the Joomla! MVC framework classes and the JDatabase classes. You are now able to write MVC components that interact with the database and can use the Joomla! installer to create and populate database tables.&lt;br /&gt;
&lt;br /&gt;
== Articles in this Series ==&lt;br /&gt;
[[Developing a Model-View-Controller Component - Part 1]]&lt;br /&gt;
&lt;br /&gt;
[[Developing a Model-View-Controller Component - Part 2 - Adding a Model]]&lt;br /&gt;
&lt;br /&gt;
[[Developing a Model-View-Controller Component - Part 3 - Using the Database]]&lt;br /&gt;
&lt;br /&gt;
[[Developing a Model-View-Controller Component - Part 4 - Creating an Administrator Interface]]&lt;br /&gt;
&lt;br /&gt;
[[Developing a Model-View-Controller Component - Part 5 - Basic Backend Framework]]&lt;br /&gt;
&lt;br /&gt;
[[Developing a Model-View-Controller Component - Part 6 - Adding Backend Actions]]&lt;br /&gt;
&lt;br /&gt;
== Contributors ==&lt;br /&gt;
* staalanden&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
The component can be downloaded at: [http://joomlacode.org/gf/download/frsrelease/8110/29435/com_hello3_01.zip com_hello3_01]&lt;br /&gt;
&lt;br /&gt;
[[Category:Database]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mkopinsky</name></author>
	</entry>
</feed>