Help with select box
2 posts by 2 authors in: Forums > CMS Builder
Last Post: May 26, 2009 (RSS)
By willbegood - May 25, 2009
Hello, i'm still trying to build a Google Map little App
I have a section for HOUSE
I have another section for RESTAURANT
What i want to do is to associate many RESTAURANTS with one HOUSE for exemple.
So in my HOUSE editor a have a field RESTAURANT-NEAR-HOUSE wich is populated from my RESTAURANT editor.
Here is my problem : i want te be able to display each field of my RESTAURANT editor calling from my RESTAURANT-NEAR-HOUSE field.
With "Get options from Database" stuff, i can only display one field (as the "value")
So i suppose i have to use "Get option from MySQL query"... but here i'm lost.
To summup, from the admin, when i create a new HOUSE entry, i give it a name, description and select as many checkbox wich are my RESTAURANT-NEAR-HOUSE entries.
And online for my restaurant-detail page i should have (assuming i have select checkbox for RESTAURANT-NEAR-HOUSE1 and 5
- name
-description
-restaurant-near-house1-NAME
-restaurant-near-house1-DESCRIPTION
-restaurant-near-house1-longitude
-restaurant-near-house1-lattitude
-restaurant-near-house5-NAME
-restaurant-near-house5-DESCRIPTION
-restaurant-near-house5-longitude
-restaurant-near-house5-lattitude
At last it is very important for me to IDENTIFY the "restaurant-near-house" fields, because i use longitude, lattitude, name, description to build my Google Map.
Hope it is clear.. and i hope it is possible.
Thanks
I have a section for HOUSE
I have another section for RESTAURANT
What i want to do is to associate many RESTAURANTS with one HOUSE for exemple.
So in my HOUSE editor a have a field RESTAURANT-NEAR-HOUSE wich is populated from my RESTAURANT editor.
Here is my problem : i want te be able to display each field of my RESTAURANT editor calling from my RESTAURANT-NEAR-HOUSE field.
With "Get options from Database" stuff, i can only display one field (as the "value")
So i suppose i have to use "Get option from MySQL query"... but here i'm lost.
To summup, from the admin, when i create a new HOUSE entry, i give it a name, description and select as many checkbox wich are my RESTAURANT-NEAR-HOUSE entries.
And online for my restaurant-detail page i should have (assuming i have select checkbox for RESTAURANT-NEAR-HOUSE1 and 5
- name
-description
-restaurant-near-house1-NAME
-restaurant-near-house1-DESCRIPTION
-restaurant-near-house1-longitude
-restaurant-near-house1-lattitude
-restaurant-near-house5-NAME
-restaurant-near-house5-DESCRIPTION
-restaurant-near-house5-longitude
-restaurant-near-house5-lattitude
At last it is very important for me to IDENTIFY the "restaurant-near-house" fields, because i use longitude, lattitude, name, description to build my Google Map.
Hope it is clear.. and i hope it is possible.
Thanks
Re: [willbegood] Help with select box
By Damon - May 26, 2009
Hi,
Try adding this code at the very bottom of your page:
<pre>
<?php print_r ($houseRecords); ?>
<br />
<?php print_r ($restaurantRecords); ?>
</pre>
Change the names to match yours.
This will output all the variable names and data from within the array. Then you will have a better idea what variables you have on the page to work with.
It is really to determine how things are set up from just a description. Could you you email us CMS Builder login details and reference this forum post:
consulting@interactivetools.com
Try adding this code at the very bottom of your page:
<pre>
<?php print_r ($houseRecords); ?>
<br />
<?php print_r ($restaurantRecords); ?>
</pre>
Change the names to match yours.
This will output all the variable names and data from within the array. Then you will have a better idea what variables you have on the page to work with.
It is really to determine how things are set up from just a description. Could you you email us CMS Builder login details and reference this forum post:
consulting@interactivetools.com
Cheers,
Damon Edis - interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Damon Edis - interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/