D
D
Denis Davydenko2018-09-01 02:20:07
Smarty
Denis Davydenko, 2018-09-01 02:20:07

How to display records from the database that have a certain value?

Hello.
I deduce through foreach an array with the data.

{foreach from=$data item=info}
                    <tr>
                        <td>{$info.A}</td>
                        <td>{$info.B}</td>
                        <td>{$info.C}</td>
                    </tr>
                {/foreach}

How to add a condition so that only those lines are displayed where, for example, the value B = Yes?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2018-09-01
@GooseTheDestroyer

And what's the problem either to collect an array in the puff with only the necessary data, or to add if to foreach in the template?
PS what are the reasons for choosing smart? if legacy is ok, if not, not ok.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question