• 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: get value in text box from database row

get value in text box from database row 14 years 2 months ago #9524

  • ginius
  • ginius's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
I try te get the startdate value from table rsevents in a textbox in rsform.

I'm using the SQL quesry:
SELECT `EventStartDate` FROM `jos_rsevents_events` WHERE `IdEvent` = 1 LIMIT 1

In phpAdmin I receive as result: 1266051600

In the default valuebox of the textbox I'm placing the code:
//<code>$db = JFactory::getDBO();$db->setQuery("SELECT `EventStartDate` FROM `jos_rsevents_events` WHERE `IdEvent` = 1 LIMIT 1");$result = $db->loadResult();return $result;//</code>

I was expecting to see the same value as phpAdmin, but it's empty.

PLease help me to solve this issue.

The reason that I like to get this data is that I can see the starting date and time of the traingingevent for the user who registered himself.

Thanks for the help already.
The administrator has disabled public write access.

Re:get value in text box from database row 14 years 2 months ago #9558

  • andreic
  • andreic's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 713
  • Thank you received: 59
Hello,

This is an example of getting the name of an event from a table row :
//<code>
$db = JFactory::getDBO();
$db->setQuery("SELECT `EventName` FROM `jos_rsevents_events` WHERE `IdEvent` = 8 limit 1");
$result = $db->loadResult();
return $result;
//</code>

You can try adding this code to the "Default value" property of your textbox and see if it works.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
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!