I'm running a while loop to print certain data from a table. Because the data for the table is stored in what will become a very large table, I've heard its a good idea to create a separate table that just stores the number of rows of relevant data for this table. I'm trying to implement this, but not having much luck, why isn't the below working?
$numberofrows=mysql_fetch_field(mysql_query("SELECT rows FROM rows WHERE guestlist_id = '$guestlist_id'")) or die();
echo $numberofrows;
The above gives the error: Catchable fatal error: Object of class stdClass could not be converted to string in FULLURL/html/scripts/addname.php on line 36
PS - this query works in phpMyAdmin, so I know the data is there. Thanks!