Revision: 1398
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1398&view=rev
Author:   cimorrison
Date:     2010-07-27 11:57:05 +0000 (Tue, 27 Jul 2010)

Log Message:
-----------
Added the 'is_nullable' property to sql_mysqli_field_info() - forgotten at Rev 
1395.

Revision Links:
--------------
    http://mrbs.svn.sourceforge.net/mrbs/?rev=1395&view=rev

Modified Paths:
--------------
    mrbs/trunk/web/mysqli.inc

Modified: mrbs/trunk/web/mysqli.inc
===================================================================
--- mrbs/trunk/web/mysqli.inc   2010-07-27 11:27:51 UTC (rev 1397)
+++ mrbs/trunk/web/mysqli.inc   2010-07-27 11:57:05 UTC (rev 1398)
@@ -369,6 +369,7 @@
 //                differences between MySQL and PostgreSQL type names.
 //  'length'      the maximum length of the field in bytes, octets or 
characters
 //                (Note:  this could be NULL)
+//  'is_nullable' whether the column can be set to NULL (boolean)
 //
 //  NOTE: the type mapping is incomplete and just covers the types commonly
 //  used by MRBS
@@ -432,11 +433,14 @@
       {
         $length = NULL;
       }
-
+      // Convert the is_nullable field to a boolean
+      $is_nullable = (strtolower($row['Null']) == 'yes') ? TRUE : FALSE;
+      
       $fields[$i]['name'] = $name;
       $fields[$i]['type'] = $type;
       $fields[$i]['nature'] = $nature;
       $fields[$i]['length'] = $length;
+      $fields[$i]['is_nullable'] = $is_nullable;
     }
   }
   return $fields;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share 
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to