Google

Count distinct records using MySQL PHP

Google

Count distinct records using MySQL PHP

You may also like...

3 Responses

  1. Aneeq says:

    This is the simplest code to select and display records from MySQL database table and display in PHP.

    $cn=mysql_connect($db_host,$db_user,$db_password) or die(mysql_error());
    mysql_select_db($db_name,$cn) or die(mysql_error());

    $sql = “SELECT field_name FROM table_name”;
    $rs = mysql_query($sql) or die(mysql_error());

    while($row = mysql_fetch_array($rs)){

    echo $field_name = $row[“field_name”];
    echo “”;

    }
    mysql_free_result($rs);

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
  2. sundar says:

    Great tutorials. Really helpful information.
    Thanks for publishing.

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)

Leave a Reply

Your email address will not be published. Required fields are marked *