I want to count how many rows i have in a table. I got a table (workstations) in my mysql database (phpmyadmin). I want to print it out, so ik can see how many workstations their are "active" in my environment
I've read many blogs about this, but all the things they propose are not working for me.
Thanks in advance!
You can see here: http://dev.mysql.com/doc/refman/5.7/en/counting-rows.html
SELECT COUNT(*) FROM table_name;
$mysqli = new mysqli("localhost", "my_user", "my_password", "world"); $query = "SELECT COUNT(*) FROM table_name"; $result = mysqli_query($mysqli,$query); $rows = mysqli_fetch_row($result); echo $rows;