Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    utilizzo della funzione COUNT in php

    raga non riesco ad utilizzare la funzione COUNT, ho questa tabella di sotto e vorrei mettere il COUNT per contare quante righe sono:

    <?
    require('config.php');
    $lole=$_COOKIE["usNick"];
    $count = "SELECT COUNT (*) FROM tb_users where referer='$lole' and refp=''";
    "echo $count;"
    ?>

    ma non mi da nessun risultato.. dove sbaglio?

    Codice PHP:
    <div id="tables">
    <table align="center" width="80%" cellspacing="0" cellpadding="0">
    <tr>
    <th class="top">[b] Username[/b]</th>
    <th class="top">[b] Paese[/b]</th>
    <th class="top">[b] Referral da †[/b]</th>
    <th class="top">[b] Ultimo Click[/b]</th>
    <th class="top">[b] Click[/b]</th>
    <?
    require('config.php');
    $lole=$_COOKIE["usNick"];
    $tabla mysql_query("SELECT * FROM tb_users where referer='$lole' and refp='' ORDER BY joindate DESC");
    mysql_close($con);
    while (
    $row mysql_fetch_array($tabla)) {
    echo 
    "<tr><td align='left'> ";
    echo 
    $row["username"];
    echo 
    "</td><td align='left'> ";
    echo 
    $row["country"];
    echo 
    "</td><td align='left'> ";
    echo 
    date("d/m/Y H:i"$row["joindate"]);
    echo 
    "</td><td align='left'> ";
    echo 
    date("d/m/Y H:i"$row["lastlogdate"]);
    echo 
    "</td><td align='right'>";
    echo 
    $row["visits"];
    echo 
    "</td></tr>";
    }
    echo 
    "</table>";
    ?>
    </div>

  2. #2

  3. #3
    ti ringrazio.. ho risolto

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.