Archived talk

Difference between revisions of "Developing a MVC Component/Using the database"

From Joomla! Documentation

Line 21: Line 21:
  
 
[[User:irajkovic|Ivan Rajkovic]] 8 April 2010 (UTC)
 
[[User:irajkovic|Ivan Rajkovic]] 8 April 2010 (UTC)
 +
 +
== Not working as expected ==
 +
 +
I may be doing something wrong, but I've copied all the code for the first 6 steps, and on this step I run into a problem. My menu item doesn't have the option to select the id under any of the settings. It does show the ID of the menu item itself, so perhaps there is a conflict based on the name??

Revision as of 12:04, 17 August 2010

This should really not be the default developing MVC component, the default should redirect to the documentation for whatever is current and this should be on a 1.6 specific page.

In what sense is it the default? Chris Davenport 20:03, 4 March 2010 (UTC)


I'm not sure is this good place to report issues with some sample code found in this tutorial, but it looks like JDatabaseQuery class has not actually being implemented in Joomla 1.6.0 Alpha2. This is causing problems with implementing Menu Item "Required Parameters". Comments in following code explain this a little bit better.

File: /administrator/components/com_testing/models/fields/testing.php (part of Joomla 1.6 test component)

    26                 $db =& JFactory::getDBO();
    27                 /* JDatabaseQuery class could not be found, so following 3 lines caused error
    28                 $query = new JDatabaseQuery;
    29                 $query->select('id,greeting');
    30                 $query->from('#__testing');
    31                 */
    32                 //manually creating query string instead
    33                 $query = 'SELECT id,greeting FROM #__testing';
    34                 $db->setQuery($query);

I recon this is something that would be fixed by actually implementing JDatabaseQuery class once Joomla 1.6 is in beta or latter stage, but for know it could be confusing to those of use following this tutorial. :)

Ivan Rajkovic 8 April 2010 (UTC)

Not working as expected[edit]

I may be doing something wrong, but I've copied all the code for the first 6 steps, and on this step I run into a problem. My menu item doesn't have the option to select the id under any of the settings. It does show the ID of the menu item itself, so perhaps there is a conflict based on the name??