Lavalair bbcode club with number users in club. . .

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Lavalair bbcode club with number users in club. . .

    Hello. . .
    Do any who know, how to make this code to work?
    Code:
    //Function for count users
    function clubusers($clid)
    {
    $users = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE clid='". $clid ."' AND accepted='1'"));
    return $users[0];
    }
    
    // BBcode
    $text = preg_replace("/\[club\=(.*?)\](.*?)\[\/club\]/is", "<div style='border-left:3px solid #777;'><a href='index.php?action=gocl&amp;clid=$1&amp;sid=$sid'>$2</a> <br /> <small> Club: ". clubusers("$1") ." peopls like this club", $text);
    Problem in code is in counter. . . result is 0. . .
    I dont know how to do make this code to work? Please help. . . And sorry for my bad English. . . thanks. . .

    #2
    clubusers($1) REMOVE "
    Last edited by pichiriche; 05.08.11, 09:11.

    Comment


      #3
      No. . . That is a counter. . . But not working correct. . . :D
      Do you understand?
      If me remove that. . . Result is: Club: peoples like this club. . .
      Show result on picture. . .
      Attached Files
      Last edited by cwikyz; 06.08.11, 10:39.

      Comment


        #4
        Teste
        $wathever = function($clubid);

        Comment


          #5
          Originally posted by pichiriche View Post
          Teste
          $wathever = function($clubid);
          Result 0. . . :/

          Added after 47 minutes:

          I created! :D
          Thanks for try to help. . . ;)
          Last edited by cwikyz; 07.08.11, 11:54.

          Comment

          Working...
          X