Buy Now
Sign in

Read data db connect problem

999daniele , October 05 at 07:37
9
999daniele
Hi Evryone,
i've a problem with my Chronoforms v6 ....
* i've create a "read_data6" that's connect with my db table "wrc_driver"
*the read_data6 in data setting have "return array of keys...."
* next i've create one dropdown that in the option fields have {var:read_data6}
the result is that i've my dropdown with ONLY one filed (the surname) but there 'nt the other table fields of my db ( name,value,age ecc.... )
where am i wrong?
thanks
GreyHead
Hi 999daniele,
Please drag a Debugger action into the On Load event, then load the form and post the debug - including the 'dummy emails' results here.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
9
999daniele
hi thanks for your answare
this is the debugger result
my dropdown contains "Sebastien" and "Thierry" but not cognome,id,valore fields
Array
(
[language] => it-IT
[Itemid] => 465
[option] => com_chronoforms6
[lang] => it-IT
[view] => form
[ark_inine_enabled] =>
)
Array
(
[read_data6] => Array
(
[log] => Array
(
[0] => SELECT `Data6`.`id_wrc_driver` AS `Data6.id_wrc_driver`, `Data6`.`Nome` AS `Data6.Nome`, `Data6`.`Cognome` AS `Data6.Cognome`, `Data6`.`Valore` AS `Data6.Valore` FROM `wrc_driver` AS `Data6` LIMIT 100;
)

[var] => Array
(
[1] => Sebastien
[2] => Thierry
)

)

)
GreyHead
Hi 999daniele,
The dropdown will only take two items for the text and value entries.
What result do you get if you copy and paste the SELECT query into PHPMyAdmin?
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
9
999daniele
hi,
in php my admin is correct query.jpg
Attachments
query.jpg
query.jpg
(142.48 KiB)
43 Downloads/Views
9
999daniele
how cain i for example show in my dropdown "id_wrc_driver" and "nome" only?
thanks
healyhatman
Post a screenshot of your read data action
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
9
999daniele
hi in attachment you have
read_data6 configuration (nome and valore )
dropdown result (only valore )dropdown.jpgread_data6.jpg
Attachments
dropdown.jpg
dropdown.jpg
(79.71 KiB)
43 Downloads/Views
read_data6.jpg
read_data6.jpg
(121.6 KiB)
30 Downloads/Views
read_data6.jpg
read_data6.jpg
(121.6 KiB)
41 Downloads/Views
healyhatman
So if I'm reading your setup and also reading the image up the top showing your read data...... Then you're getting exactly what you're requesting. Valore appears to be 100 in each row, and you're using that as the label.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
9
999daniele
I do not know if I'm explaining the right way ... I'll explain what I need:
in my db i've on table "wrc_driver"
that table,for example have that records:
nome: Sebastian
cognome: Ogier
valore: 100
nome: Thierry
cognome: Neuville
valore: 100
i want a dropbox that show:
- Ogier 100
-Neuville 100
how can i do?
healyhatman
Concat(model.field , ' ' , model.field2):model.alias
Pay attention to the spaces between the commas
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
9
999daniele
i've done:
Concat(Data6.nome , ' ' , Data6.cognome):Data6.count_alias
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM `wrc_driver` AS `Data6` LIMIT 100' at line 1 SQL=SELECT FROM `wrc_driver` AS `Data6` LIMIT 100;"
9
999daniele
Solved:
Concat(Nome , ' ', Cognome , ' ' , Valore):Descrizione
wrong Upper nome (Nome) :-)))
thanks everone!