• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Retrieve data from mysql and fill multiple fields

Retrieve data from mysql and fill multiple fields 9 years 1 week ago #34877

  • tim637
  • tim637's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hey guys,

I can get my data from my sql table, but how can you fill in multiple fields in my new form from that specific row saved in $result?
This is what i got so far... (i'm not a programmer)

<code>
$items = array();
$db = JFactory::getDbo();
$items[] = "|Please Select[c]";
$db->setQuery("SELECT title, description FROM joslc_pf_projects");
$results = $db->loadObjectList();
foreach ($results as $result) {
$value = $result->title;
$label = $result->title;
$items[] = $value.'|'.$label;
}

$items = implode("\n", $items);

return $items;
</code>

Help is really appreciated!
Tim
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!