Modifying Component Topic is solved

For Joomla! 3.x Coding related discussions, you could also use: http://groups.google.com/group/joomla-dev-general

Moderators: ooffick, General Support Moderators

Forum rules
Locked
iatigerhawk
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Feb 20, 2017 6:47 pm

Modifying Component

Post by iatigerhawk » Tue Jan 29, 2019 3:14 am

I have been trying to understand the workings of the component tutorial but seem to be a little stumped. I don't have much experience with php or joomla so that just adds to the confusion. I was able to modify the component tutorial to call my test db and return multiple values but that is where I have been stuck. From what I can gather JTable only allows you to return one row from the database. I am trying to make a component that can display multiple rows from the database and am having trouble finding an alternative to JTable. Can anyone point me to the best place to understand/compare all of the php classes Joomla has?
Last edited by imanickam on Tue Jan 29, 2019 5:14 am, edited 1 time in total.
Reason: Moved topic » from General Questions/New to Joomla! 3.x to Joomla! 3.x Coding

annahersh
Joomla! Guru
Joomla! Guru
Posts: 734
Joined: Wed Aug 15, 2018 8:23 pm

Re: Modifying Component

Post by annahersh » Tue Jan 29, 2019 5:30 am

There are multiple methods to out put db table rows
loadRow()
loadRowList()

See some usage guide at https://docs.joomla.org/Selecting_data_using_JDatabase

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17427
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Modifying Component

Post by toivo » Tue Jan 29, 2019 5:32 am

The following tutorial is a good starting point: https://docs.joomla.org/Accessing_the_d ... _JDatabase

The next step could be the API: https://api.joomla.org/cms-3/classes/JD ... river.html
Toivo Talikka, Global Moderator

iatigerhawk
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Feb 20, 2017 6:47 pm

Re: Modifying Component

Post by iatigerhawk » Tue Jan 29, 2019 7:31 pm

Thanks for the responses. I have looked through the database tutorial in the past. I will look again. It sounds as if I should not be trying to use JTable but instead use JDatabase? Thanks again for the information.


Locked

Return to “Joomla! 3.x Coding”