Display mysql field length with PHP

Free Scripts :: PHP :: PHP and Mysql :: Display mysql field length with PHP

Author: Salman Javaid

Website: http://www.salman.be

  1. How to display mysql field length.
  2. Show mysql table's field length with php.
  3. List all field lengths of mysql table.

This script list field length of all mysql table fields.

Script

$i=0;
$sql = mysql_query("select * from products");
while( $i < mysql_num_fields($sql))
{
    echo mysql_field_len($sql, $i)  .  ', ';
    $i++;
}

Output

11, 250, 5, 5, 65535

Comments

No comments. Be the first one.

Leave a comment

Full Name*
Comments*
Security Code*

Our Partners

Getty Icons  Salman Creations
Free High Quality Images  Learn Free Languages 
Opal Hosting  R-Tech Solutions
  • Submit a Script

    Click here to submit your script.