CalcBuilder Forum

Database

User moon_340 2012-03-13 09:33:25

I have some troubles getting Calc Builder to interact with a table in a MySQL database.

The database name is ‘ifabrix_com’ and the table is called ‘Konstruktioner’.
You can see the table on the homepage www.ifabrix.com
Each row in the table is a ‘Konstruktion’.

At the bottom you can see the calculation module. I want the drop down menus a1-d1 to contain values from the column Konstruktion.

I have tried following in the field type ’Option list’ under add SQL string but it doesn't work:
SELECT ‘Konstruktion’ from ‘Konstruktioner’
And:
USE ’ifabrix_com’; SELECT ‘Konstruktion’ from ‘Konstruktioner’

I also need to pull out the value ’Døgnlagringskapacitet’ attached to each ‘Konstruktion’ for further calculations.

I’m looking forward to hear from you.

Moonsoft support 2012-03-13 09:42:52

Hello,

We received your mail and we answered in HelpDesk. We paste it here:


To fill results in option list using SQL you should 'name' columns as follows: To fill value at option list, use 'as mvkey' in SQL sentence and to get view Name use 'mvvalue'

Here are an example of an SQL to get all users from your joomla:

select id as mvkey, name as mvvalue from #__users

Please note that if you use other database, maybe you should change #__users for your DATABASE.TABLE

Hope this helps. Regards,

Moonsoft Team.

User moon_340 2012-03-14 12:20:17

Thanks for your reply. It helped me a lot further.

I have a new question.

When I press calculate at www.ifabrix.com I get this message:
Notice: Undefined offset: 1 in /var/www/web103/web/components/com_calcbuilder/models/calcbuilder.php on line 85

I have emailed you the latest version of the XML-file.

Can you help me with that?

Regards,

Magne.

Moonsoft support 2012-03-14 19:35:28

Hello,

What your system is showing is a set of 'warnings' or notices, they are not errors.

Please check the following: Go to Site->Global Configuration->Server
and try to change Error Reporting parameter to 'Simple' or 'None' and try again.

Regards,

Moonsoft Team

...
Support/development 40 hours

With the peace of mind of having a professional team at your service (20% discount)

Buy now!
...
CalcBuilder

Create dynamic calculators

Buy now!