Thread: Count
View Single Post
  #1  
Old 21st October 2011, 23:36
FTWR FTWR is offline
Senior Member
 
Join Date: Sep 2011
P2P
Posts: 34
Default Count
I need a function to cleanup.php file to count how much uploaded torrents and forum posts have every user.

Quote:
$uploaded_torrents = mysql_query("SELECT COUNT(*) FROM torrents WHERE owner=" . $user["id"] ."") or print(mysql_error());
Quote:
$forum_posts = mysql_query("SELECT COUNT(*) FROM posts WHERE userid=" . $user['id']) or sqlerr();
Where is the mistake because the lines don't work.

P.S: I use Tbdev 2009!
Reply With Quote