SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Dec 2004
    Location
    Monterrey, N.L. México
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Additional info of fields in mysql table?

    Is it posible to have comments about the field in the definition of mysql table (like access do)?

    El quijote

  2. #2
    SitePoint Enthusiast kamakaze03's Avatar
    Join Date
    Nov 2003
    Location
    ohio
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think when creating table you can add comments about the table in general but I am not sure you can for the fields.

  3. #3
    SitePoint Addict
    Join Date
    Aug 2005
    Posts
    207
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi

    Although You can not add a field definition MYSQL_FIELD! You can direct to arbitrary column that can hold a custom field definition!

    MYSQLI example

    Code:
    	$sql = "MYSQL_FIELD *field FROM table";
    
    	$r = mysqli_query ( $sql );
    
    	$num_fields = mysqli_num_fields ( $r );
    
    	for ( $i = 0; $i < $num_fields; $i++)
    	{
    		$field = mysqli_fetch_field_direct ( $r, $i ); // object
    
    		printf ( "Field %u is %s\r\n", $i, $field->name );
    	}
    printf


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •