+ 2

How we put the rows count in php and mysql?

29th Dec 2016, 1:12 PM
Sadique Hussain
Sadique Hussain - avatar
3 Antworten
+ 5
by using mysql_num_rows function
30th Dec 2016, 1:07 AM
Raj Shekhar
Raj Shekhar - avatar
+ 3
do a fetch_assoc in a rows var, and then loop or use lenght property
29th Dec 2016, 1:19 PM
Nahuel
Nahuel - avatar
+ 1
DO NOT USE mysql php functions. they are depreciated. depends on if you're using pdo or mysqli. but as stated previously, with fetch_assoc you can count() the rows or pass a count in the query itself.
30th Dec 2016, 8:55 PM
Louis Milotte
Louis Milotte - avatar