Number of rows in table

I used this in one other app:
[nova_stevilka] = mysql_num_rows(mysql_query(“SELECT * FROM KD_nivo1 WHERE group_id = [group_id]”));

Now I just copy/pase, but it doesn’t work anymore.

Do you have any good solution for getting number of rows in certain table?

Thanks!

PHP 7? Mysql* is deprecated and deleted on PHP 7, use mysqli* instead

Hello,
I think that you are complicating yourself , why do not use count() function? :stuck_out_tongue:


sc_lookup(rs, "SELECT count(*) FROM KD_nivo1 WHERE group_id = [group_id]");
[nova_stevilka] = {rs[0][0]};