$NUMROW Help
Posted: Wed Sep 03, 2008 4:10 pm
Ok, Again this is probably an obvious error I am missing here (newbie that I am)....
I am trying to get the code to count the number of items of a given member and multiply that number by 4 and give a total.
This is the code I have:
It keeps showing $cost as 44 no matter how many items there actually are in the database.
What am I doing wrong?
I am trying to get the code to count the number of items of a given member and multiply that number by 4 and give a total.
This is the code I have:
Code: Select all
$NUMROWS = mysql_query("select count(*) from items WHERE `user`='user'");
$cost = $NUMROWS * 4;
print " $cost";It keeps showing $cost as 44 no matter how many items there actually are in the database.