30.10.2014, 22:21
(
Последний раз редактировалось GWMPT; 30.10.2014 в 23:43.
Причина: Added some information so the OP can solve this problem
)
num_rows will always return 1 when using a COUNT instruction in the query..
---
Use fetch_row function instead.
The first row[and the unique row from the SELECT instruction, returned from the fetch_row function] will contain the numbers 0 or 1 from the query you made.
Then, free the result, and return the value.
---
Use fetch_row function instead.
The first row[and the unique row from the SELECT instruction, returned from the fetch_row function] will contain the numbers 0 or 1 from the query you made.
Then, free the result, and return the value.