There are no available options for this view.

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 11216 by lem9, Sun Apr 27 15:45:50 2008 UTC revision 11217 by lem9, Mon Apr 28 16:47:31 2008 UTC
# Line 564  Line 564 
564   * @uses    MYSQLI_TIMESTAMP_FLAG   * @uses    MYSQLI_TIMESTAMP_FLAG
565   * @uses    MYSQLI_AUTO_INCREMENT_FLAG   * @uses    MYSQLI_AUTO_INCREMENT_FLAG
566   * @uses    MYSQLI_TYPE_ENUM   * @uses    MYSQLI_TYPE_ENUM
  * @uses    MYSQLI_BINARY_FLAG  
567   * @uses    MYSQLI_ZEROFILL_FLAG   * @uses    MYSQLI_ZEROFILL_FLAG
568   * @uses    MYSQLI_UNSIGNED_FLAG   * @uses    MYSQLI_UNSIGNED_FLAG
569   * @uses    MYSQLI_BLOB_FLAG   * @uses    MYSQLI_BLOB_FLAG
# Line 584  Line 583 
583          define('MYSQLI_ENUM_FLAG', 256); // see MySQL source include/mysql_com.h          define('MYSQLI_ENUM_FLAG', 256); // see MySQL source include/mysql_com.h
584      }      }
585      $f = mysqli_fetch_field_direct($result, $i);      $f = mysqli_fetch_field_direct($result, $i);
586        $charsetnr = $f->charsetnr;
587      $f = $f->flags;      $f = $f->flags;
588      $flags = '';      $flags = '';
589      if ($f & MYSQLI_UNIQUE_KEY_FLAG)     { $flags .= 'unique ';}      if ($f & MYSQLI_UNIQUE_KEY_FLAG)     { $flags .= 'unique ';}
# Line 593  Line 593 
593      if ($f & MYSQLI_TIMESTAMP_FLAG)      { $flags .= 'timestamp ';}      if ($f & MYSQLI_TIMESTAMP_FLAG)      { $flags .= 'timestamp ';}
594      if ($f & MYSQLI_AUTO_INCREMENT_FLAG) { $flags .= 'auto_increment ';}      if ($f & MYSQLI_AUTO_INCREMENT_FLAG) { $flags .= 'auto_increment ';}
595      if ($f & MYSQLI_ENUM_FLAG)           { $flags .= 'enum ';}      if ($f & MYSQLI_ENUM_FLAG)           { $flags .= 'enum ';}
596      if ($f & MYSQLI_BINARY_FLAG)         { $flags .= 'binary ';}      // See http://dev.mysql.com/doc/refman/6.0/en/c-api-datatypes.html:
597        // to determine the data type, we should not use MYSQLI_BINARY_FLAG
598        // the binary flag but instead the charsetnr member of the MYSQL_FIELD
599        // structure. Unfortunately there is no equivalent in the mysql extension.
600        if (63 == $charsetnr)                { $flags .= 'binary ';}
601      if ($f & MYSQLI_ZEROFILL_FLAG)       { $flags .= 'zerofill ';}      if ($f & MYSQLI_ZEROFILL_FLAG)       { $flags .= 'zerofill ';}
602      if ($f & MYSQLI_UNSIGNED_FLAG)       { $flags .= 'unsigned ';}      if ($f & MYSQLI_UNSIGNED_FLAG)       { $flags .= 'unsigned ';}
603      if ($f & MYSQLI_BLOB_FLAG)           { $flags .= 'blob ';}      if ($f & MYSQLI_BLOB_FLAG)           { $flags .= 'blob ';}

Legend:
Removed from v.11216  
changed lines
  Added in v.11217