Buy Now
Sign in

Read data db connect problem

999daniele , October 05 2018, 07:37
9
999daniele 8
October 05 2018, 07:37 #380645
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 64
October 05 2018, 09:31 #380648
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 8
October 05 2018, 09:42 #380650
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 64
October 05 2018, 10:45 #380653
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 8
October 05 2018, 12:16 #380655
hi,
in php my admin is correct query.jpg
Attachments
query.jpg
query.jpg
(142.48 KiB)
182 Downloads/Views
9
999daniele 8
October 05 2018, 12:32 #380656
how cain i for example show in my dropdown "id_wrc_driver" and "nome" only?
thanks
healyhatman 6
October 05 2018, 12:52 #380657
Post a screenshot of your read data action
Web developer at SkySpider.com.au
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
9
999daniele 8
October 05 2018, 13:02 #380659
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)
184 Downloads/Views
read_data6.jpg
read_data6.jpg
(121.6 KiB)
126 Downloads/Views
read_data6.jpg
read_data6.jpg
(121.6 KiB)
174 Downloads/Views
healyhatman 6
October 05 2018, 13:08 #380660
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
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
9
999daniele 8
October 05 2018, 13:23 #380661
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 6
October 05 2018, 13:29 #380662
Concat(model.field , ' ' , model.field2):model.alias
Pay attention to the spaces between the commas
Web developer at SkySpider.com.au
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
9
999daniele 8
October 05 2018, 14:20 #380663
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 8
October 05 2018, 14:47 #380665
Solved:
Concat(Nome , ' ', Cognome , ' ' , Valore):Descrizione
wrong Upper nome (Nome) :-)))
thanks everone!