1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 05:37:32 +02:00

mysql handler: _FIELD_TYPES aliases, new type 'null' added

This commit is contained in:
secretr
2009-09-10 19:13:39 +00:00
parent 2223b75227
commit 75294085a0

View File

@@ -9,9 +9,9 @@
* mySQL Handler
*
* $Source: /cvs_backup/e107_0.8/e107_handlers/mysql_class.php,v $
* $Revision: 1.50 $
* $Date: 2009-09-10 15:24:57 $
* $Author: e107coders $
* $Revision: 1.51 $
* $Date: 2009-09-10 19:13:39 $
* $Author: secretr $
*/
if(defined('MYSQL_LIGHT'))
@@ -63,8 +63,8 @@ $db_ConnectionID = NULL; // Stores ID for the first DB connection used - which s
*
* @package e107
* @category e107_handlers
* @version $Revision: 1.50 $
* @author $Author: e107coders $
* @version $Revision: 1.51 $
* @author $Author: secretr $
*
*/
class e_db_mysql {
@@ -88,8 +88,10 @@ class e_db_mysql {
var $mySQLtableListLanguage = array(); // Db table list for the currently selected language
/**
* @public MySQL Charset
**/
* MySQL Charset
*
* @var string
*/
public $mySQLcharset;
var $total_results; // Total number of results
@@ -570,6 +572,7 @@ class e_db_mysql {
switch ($type)
{
case 'int':
case 'integer':
return (int)$fieldValue;
break;
@@ -577,10 +580,15 @@ class e_db_mysql {
return $fieldValue;
break;
case 'str':
case 'string':
return "'{$fieldValue}'";
break;
case 'null':
return ($fieldValue ? "'{$fieldValue}'" : 'NULL');
break;
case 'escape':
return "'".mysql_real_escape_string($fieldValue)."'";
break;