okay this seems really basic mysql but I cannot seem to get it to work.
I am trying to count the number of rows in a database
My code goes like this:
$q = "SELECT COUNT(*) FROM `test` WHERE `Type` = \'1\' LIMIT 0, 30 "; $count_tst = mysqli_query($dbc, $q); echo "$count_tst";
And I know this works because when I run it in the PHPMyAdmin utility it runs perfectly.
Am I missing something here?
Any help??
Many Thanks,
J
P.s i forgot to say that the problem is there is nothing being echoed out of the variable $count_tst and i am already connected to the database, i just haven't pasted the code (it defo connects right as i link to the connection page with a require_once(); which works correctly on other pages I've done.)


Sign In
Create Account


Back to top









