Is there a function equivalent to mysql_num_rows
to count the number of columns in a PHP mysql recordset?
If not, rather than just saying so can you please advise me of the best way to make a function that does this.
I have already looked at: http://www.daniweb.com/web-development/php/threads/277417/to-find-the-number-of-columns-in-a-table-using-mysql-query and http://www.ozzu.com/programming-forum/mysql-number-columns-table-t67489.html but neither of these solutions seem particularly elegant.