Forums

Row in where conditions read data?

ieraora 19 Apr, 2020
Hello. I tried to search in forum without solution.

In this read data I would to have a count of records, but the results is 0. Where I wrong?





Array
(
    [conn] => BE_listini
    [event] => listini_cestinati
    [Itemid] => 117
    [option] => com_chronoconnectivity6
    [view] => connection
)
Array
(
    [read_listini_cestinati] => Array
        (
            [log] => Array
                (
                    [0] => SELECT COUNT(`listini_cestinati`.`id`) AS `listini_cestinati.count` FROM `xijhd_cf_prodotti_listini` AS `listini_cestinati` WHERE `listini_cestinati`.`cestino` = '1';
                    [1] => SELECT `listini_cestinati`.`id` AS `listini_cestinati.id`, `listini_cestinati`.`l_nome` AS `listini_cestinati.l_nome`, `listini_cestinati`.`id_galleria` AS `listini_cestinati.id_galleria`, `listini_cestinati`.`cestino` AS `listini_cestinati.cestino`, `listini_cestinati`.`id_listino-off` AS `listini_cestinati.id_listino-off` FROM `xijhd_cf_prodotti_listini` AS `listini_cestinati` WHERE `listini_cestinati`.`cestino` = '1' ORDER BY `listini_cestinati.l_nome` ASC LIMIT 30;
                )

            [var] => Array
                (
                    [0] => Array
                        (
                            [listini_cestinati] => Array
                                (
                                    [id] => 210
                                    [l_nome] => listino prova
                                    [id_galleria] => 0
                                    [cestino] => 1
                                    [id_listino-off] => 0
                                )

                        )

                    [1] => Array
                        (
                            [listini_cestinati] => Array
                                (
                                    [id] => 207
                                    [l_nome] => Matrimoni
                                    [id_galleria] => 0
                                    [cestino] => 1
                                    [id_listino-off] => 0
                                )

                        )

                    [2] => Array
                        (
                            [listini_cestinati] => Array
                                (
                                    [id] => 205
                                    [l_nome] => rterter
                                    [id_galleria] => 0
                                    [cestino] => 1
                                    [id_listino-off] => 0
                                )

                        )

                )

        )

    [read_photos] => Array
        (
            [log] => Array
                (
                    [0] => SELECT COUNT(`read_photos`.`cf_id`) AS `read_photos.count` FROM `xijhd_cf_product_data-2` AS `read_photos` WHERE `read_photos`.`id_listino` = '';
                )

            [var] => 0
        )

    [check_listino_in_use] => Array
        (
            [finished] => 1
            [var] => falso
        )
If in WHERE CONDITIONS, instead "row" I use a number, for example "2", it is correct, but I need a variable of the row



Thank you for replay.
ieraora 20 Apr, 2020
Answer
1 Likes
I've use another way, following this link https://www.chronoengine.com/forums/posts/t107292/count-on-another-table?keywords=count
Thank you.
Max_admin 30 Apr, 2020
The row variable has no value here, unless you are calling this Read Data inside a Loop action!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.