Forums

Read Data fails when where condition added

robinG 02 Apr, 2019
I have a record in the database table which I am trying to retrieve. The data was created using chronforms4 and can be retrieved if the where clause is left out. This generates the sql
[0] => SELECT `lv2`.`cf_id` AS `lv2.cf_id`, `lv2`.`cf_uid` AS `lv2.cf_uid`, `lv2`.`cf_created` AS `lv2.cf_created`, `lv2`.`cf_modified` AS `lv2.cf_modified`, `lv2`.`cf_created_by` AS `lv2.cf_created_by`, `lv2`.`cf_modified_by` AS `lv2.cf_modified_by`, `lv2`.`cf_ipaddress` AS `lv2.cf_ipaddress`, `lv2`.`cf_user_id` AS `lv2.cf_user_id`, `lv2`.`PogNum` AS `lv2.PogNum`, `lv2`.`FullName` AS `lv2.FullName`, `lv2`.`email` AS `lv2.email`, `lv2`.`Day1` AS `lv2.Day1`, `lv2`.`Day2` AS `lv2.Day2`, `lv2`.`Day3` AS `lv2.Day3`, `lv2`.`Day4` AS `lv2.Day4`, `lv2`.`Day5` AS `lv2.Day5`, `lv2`.`Day6` AS `lv2.Day6`, `lv2`.`Day7` AS `lv2.Day7`, `lv2`.`Day8` AS `lv2.Day8`, `lv2`.`Day9` AS `lv2.Day9`, `lv2`.`Day10` AS `lv2.Day10`, `lv2`.`Mast1` AS `lv2.Mast1`, `lv2`.`Mast2` AS `lv2.Mast2`, `lv2`.`firstAider` AS `lv2.firstAider`, `lv2`.`teamLeader` AS `lv2.teamLeader` FROM `vzlqd_cf_LiftVolunteers2` AS `lv2` LIMIT 100;
and returns
            [var] => Array
                (
                    [lv2] => Array
                        (
                            [cf_id] => 1
                            [cf_uid] => cdcd2612ecea080b5e7024a1a759dea5
                            [cf_created] => 2019-04-01 09:18:59
                            [cf_modified] => 0000-00-00 00:00:00
                            [cf_created_by] => 484
                            [cf_modified_by] => 0
                            [cf_ipaddress] => 127.0.0.1
                            [cf_user_id] => 484
                            [PogNum] => 1137.1
                            [FullName] => Robin Guess
                            [email] => 
                            [Day1] => Not Available
                            [Day2] => Not Available
                            [Day3] => Any
                            [Day4] => Hull Yard
                            [Day5] => Not Available
                            [Day6] => Catering
                            [Day7] => Not Available
                            [Day8] => Not Available
                            [Day9] => 
                            [Day10] => 
                            [Mast1] => 
                            [Mast2] => 
                            [firstAider] => Y
                            [teamLeader] => 
                        )

 
If I then add a where clause in the designer it generates the following SQL
[0] => SELECT `lv2`.`cf_id` AS `lv2.cf_id`, `lv2`.`cf_uid` AS `lv2.cf_uid`, `lv2`.`cf_created` AS `lv2.cf_created`, `lv2`.`cf_modified` AS `lv2.cf_modified`, `lv2`.`cf_created_by` AS `lv2.cf_created_by`, `lv2`.`cf_modified_by` AS `lv2.cf_modified_by`, `lv2`.`cf_ipaddress` AS `lv2.cf_ipaddress`, `lv2`.`cf_user_id` AS `lv2.cf_user_id`, `lv2`.`PogNum` AS `lv2.PogNum`, `lv2`.`FullName` AS `lv2.FullName`, `lv2`.`email` AS `lv2.email`, `lv2`.`Day1` AS `lv2.Day1`, `lv2`.`Day2` AS `lv2.Day2`, `lv2`.`Day3` AS `lv2.Day3`, `lv2`.`Day4` AS `lv2.Day4`, `lv2`.`Day5` AS `lv2.Day5`, `lv2`.`Day6` AS `lv2.Day6`, `lv2`.`Day7` AS `lv2.Day7`, `lv2`.`Day8` AS `lv2.Day8`, `lv2`.`Day9` AS `lv2.Day9`, `lv2`.`Day10` AS `lv2.Day10`, `lv2`.`Mast1` AS `lv2.Mast1`, `lv2`.`Mast2` AS `lv2.Mast2`, `lv2`.`firstAider` AS `lv2.firstAider`, `lv2`.`teamLeader` AS `lv2.teamLeader` FROM `vzlqd_cf_LiftVolunteers2` AS `lv2` WHERE `lv2`.`PogNum` = '1137.1' LIMIT 100;
however var is empty.
If I paste this SQL into MySQL Workbench and run it, it returns the expected record.
In the read data designer I have



Please advise if I have missed anything out.
Thanks
R
Max_admin 04 Apr, 2019
Hi Robin,

Do you have the same issue with the Joomla content table or only this table ?

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.