• 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: Auto-populate a list from a table

Auto-populate a list from a table 11 years 11 months ago #23247

Hi,

I try to auto-populate a list from a table and my script return all items. But, at least, it returns a "blank" item in my list box.

The script I use is :
//<code>
$items = "|Please Select[c]\n";
$db =& JFactory::getDBO();
$db->setQuery("SELECT name FROM lfa30_users");
$result = $db->loadObjectList();
 
foreach ($result as $r)
      $items .= $r->name . "\n";
return $items;
//</code>

I can't understand why ...

Thank you for your help.

Michel.

PS : Sorry if my english is awfull but I'm french.
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!