array with data from an sql query

0

How can I get the number of example records:

count (id) = 20

I need an array with total values = [1,2,3,4 --- 20]

so that if I have:

x id number can count them regardless of their value id = [1,2,3,4,5,6,7,8,9 ... 14]

    
asked by matteo 11.07.2017 в 19:06
source

1 answer

0

you can do this:

Inquiry

SELECT COUNT(id) as RowCounter FROM fooTable;

how to print it:

echo $Result['RowCounter'];
    
answered by 11.07.2017 в 19:29