mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 17:39:46 +01:00
Option to handle 'text NOT NULL' fields
This commit is contained in:
parent
b4702f49d1
commit
d0111eec57
@ -9,9 +9,9 @@
|
|||||||
* mySQL Handler
|
* mySQL Handler
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/mysql_class.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_handlers/mysql_class.php,v $
|
||||||
* $Revision: 1.59 $
|
* $Revision: 1.60 $
|
||||||
* $Date: 2009-10-22 13:00:11 $
|
* $Date: 2009-10-29 21:28:09 $
|
||||||
* $Author: e107coders $
|
* $Author: e107steved $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(defined('MYSQL_LIGHT'))
|
if(defined('MYSQL_LIGHT'))
|
||||||
@ -49,8 +49,8 @@ $db_ConnectionID = NULL; // Stores ID for the first DB connection used - which s
|
|||||||
*
|
*
|
||||||
* @package e107
|
* @package e107
|
||||||
* @category e107_handlers
|
* @category e107_handlers
|
||||||
* @version $Revision: 1.59 $
|
* @version $Revision: 1.60 $
|
||||||
* @author $Author: e107coders $
|
* @author $Author: e107steved $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class e_db_mysql {
|
class e_db_mysql {
|
||||||
@ -393,6 +393,18 @@ class e_db_mysql {
|
|||||||
if(!isset($arg['data'])) { return false; }
|
if(!isset($arg['data'])) { return false; }
|
||||||
|
|
||||||
|
|
||||||
|
// Handle 'NOT NULL' fields without a default value
|
||||||
|
if (isset($arg['_NOTNULL']))
|
||||||
|
{
|
||||||
|
foreach ($arg['_NOTNULL'] as $f => $v)
|
||||||
|
{
|
||||||
|
if (!isset($arg['data'][$f]))
|
||||||
|
{
|
||||||
|
$arg['data'][$f] = $v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$fieldTypes = $this->_getTypes($arg);
|
$fieldTypes = $this->_getTypes($arg);
|
||||||
$keyList= '`'.implode('`,`', array_keys($arg['data'])).'`';
|
$keyList= '`'.implode('`,`', array_keys($arg['data'])).'`';
|
||||||
$tmp = array();
|
$tmp = array();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user