Trouble with Condition Syntax CC5

hangbill 11 Aug, 2017
Have a CF Joomla login. The Joomla admin has to activate registered user.
The jos_users table has a field called Block (tinyint). Block is set to 1 if not activated and 0 if activated.

Also have a CC table that shows registered users. But it shows all users, activated and not activated. I want to show only actived users. So in the CC directory have set a condition
<?php> 
return array("block" =>"0");


Tried different things / combos (eg remove quotes for the 0) but get parse errors...
What am I doing wrong?

Thanks
GreyHead 11 Aug, 2017
Hi hangbill,

Is the column name 'block' or 'Block' - they are different?

Bob
hangbill 11 Aug, 2017
Hi Greybeard
It's block ... small b
hangbill 11 Aug, 2017
Any further ideas on this one...thanks
GreyHead 12 Aug, 2017
Hi hangbill,

Please turn the CC Debugger on and copy and paste the debug output here.

Bob
hangbill 14 Aug, 2017
This is the WHERE PHP.
block is tintyiny

<?php>
return array("block" =>"0");

The PHP produces no WHERE condition in key3.

Array
(
[0] => SELECT `Extension`.`id` AS `Extension.id`, `Extension`.`name` AS `Extension.name` FROM `jospc_chronoengine_extensions` AS `Extension` WHERE `Extension`.`enabled` = '1' ORDER BY `Extension`.`ordering` ASC
[1] => SELECT `Connection`.`id` AS `Connection.id`, `Connection`.`title` AS `Connection.title`, `Connection`.`params` AS `Connection.params`, `Connection`.`extras` AS `Connection.extras`, `Connection`.`published` AS `Connection.published` FROM `jospc_chronoengine_connections` AS `Connection` WHERE `Connection`.`title` = 'memberDirectory' AND `Connection`.`published` = '1'
[2] => SELECT COUNT(`users`.`id`) AS `users.count` FROM `jospc_users` AS `users`
[3] => SELECT `users`.`id` AS `users.id`, `users`.`name` AS `users.name`, `users`.`username` AS `users.username`, `users`.`email` AS `users.email`, `users`.`password` AS `users.password`, `users`.`occupation` AS `users.occupation`, `users`.`describeoccupation` AS `users.describeoccupation`, `users`.`ciuStatus` AS `users.ciuStatus`, `users`.`experience` AS `users.experience`, `users`.`explainexperience` AS `users.explainexperience`, `users`.`company` AS `users.company`, `users`.`city` AS `users.city`, `users`.`province` AS `users.province`, `users`.`country` AS `users.country`, `users`.`namecountry` AS `users.namecountry`, `users`.`telephone` AS `users.telephone`, `users`.`block` AS `users.block`, `users`.`sendEmail` AS `users.sendEmail`, `users`.`registerDate` AS `users.registerDate`, `users`.`lastvisitDate` AS `users.lastvisitDate`, `users`.`activation` AS `users.activation`, `users`.`params` AS `users.params`, `users`.`lastResetTime` AS `users.lastResetTime`, `users`.`resetCount` AS `users.resetCount`, `users`.`otpKey` AS `users.otpKey`, `users`.`otep` AS `users.otep`, `users`.`requireReset` AS `users.requireReset` FROM `jospc_users` AS `users` LIMIT 30
)
hangbill 14 Aug, 2017
Tried this too, nothing
Select * FROM jospc_users WHERE <?php>return array("block"=>0);?>
GreyHead 14 Aug, 2017
Answer
Hi Hangbill,

Please try without the > after <?php

Bob
hangbill 14 Aug, 2017
It was my PHP tag - thanks Greyhead, and sorry for wasting your time...
This topic is locked and no more replies can be posted.