- Posts: 10
- Thank you received: 1
How to query custom event fields?
- Hans Hermans
- Topic Author
- Offline
- New Member
-
Less
More
9 years 2 months ago #93180
by Hans Hermans
How to query custom event fields? was created by Hans Hermans
Hi Tuan,
I'm using Events Booking as a eventmanagementtool for our bicycle club ( www.wtcdehellen.nl ). It's working ok and our clubmember love your module.
They can subscribe for a biketour. Each biketour has a lable for climbtours or nonclimbing-tours and the distance in km. Some of those tours (events) will be ranked in a sort of competition. We simply add the distances of all registrants of the events/tours. The make this atuomatic it would be nice if we can query this from the _eb_events-table. The field "custom_fields" is a sort of array, which i can not directly query. Can you help me with this?
What i want is a list of all names of registrants with the total of distances (one of the fields in the array) and part of a tourtype (Klassement = Hemel of Klassement = Hellen).
I hope you can help me.
I'm using Events Booking as a eventmanagementtool for our bicycle club ( www.wtcdehellen.nl ). It's working ok and our clubmember love your module.
They can subscribe for a biketour. Each biketour has a lable for climbtours or nonclimbing-tours and the distance in km. Some of those tours (events) will be ranked in a sort of competition. We simply add the distances of all registrants of the events/tours. The make this atuomatic it would be nice if we can query this from the _eb_events-table. The field "custom_fields" is a sort of array, which i can not directly query. Can you help me with this?
What i want is a list of all names of registrants with the total of distances (one of the fields in the array) and part of a tourtype (Klassement = Hemel of Klassement = Hellen).
I hope you can help me.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Away
- Administrator
-
9 years 2 months ago #93218
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to query custom event fields?
Hello Hans
Unfortunately, there is no way to query that data directly. I guess you will have to query to get the custom_fields field, then process the data in that field and display it in the way you want
Image that you get list of records you want to display in a $rows variable. You can call EventbookingHelperData::prepareCustomFieldsData($rows, 'list');
After calling that, you can
foreach($rows as $row)
{
echo $row->name_of_field; // This will give the value of the event custom field you want to get
}
It however, require modifying code and you will need to know Joomla / PHP programming to do this modification
Tuan
Unfortunately, there is no way to query that data directly. I guess you will have to query to get the custom_fields field, then process the data in that field and display it in the way you want
Image that you get list of records you want to display in a $rows variable. You can call EventbookingHelperData::prepareCustomFieldsData($rows, 'list');
After calling that, you can
foreach($rows as $row)
{
echo $row->name_of_field; // This will give the value of the event custom field you want to get
}
It however, require modifying code and you will need to know Joomla / PHP programming to do this modification
Tuan
The following user(s) said Thank You: Hans Hermans
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2026 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.