D
D
Denis Yulamanov2020-03-03 16:35:34
PHP
Denis Yulamanov, 2020-03-03 16:35:34

Is it possible to replace mysqli_num_rows() with something?

Is it possible to replace mysqli_num_rows() with something else?
It is not necessary to ask why this is necessary .

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Ruslan Fedoseev, 2020-03-03
@DvDenis

select count(*) from table where ....

F
FanatPHP, 2020-03-03
@FanatPHP

Need. mysqli_num_rows() is a completely pointless function. Which is absent in other api, due to its uselessness. And wherever it is used, you can do without it.
Ask why this is necessary. Since this function is used as a crutch in a variety of cases, and in order to answer, you need to know which crutch is used in this case.

N
Northern Lights, 2020-03-03
@php666

It is not necessary to ask why this is necessary.
but let's ask anyway. And you describe the task.
mysqli_num_rows is just an indication of how many rows the select query returned ; you do
n't need to replace it
; you just need to describe what you want to do
; you suspect that you need something like SQL_CALC_FOUND_ROWS

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question