From 32b40db8d2e799588bb78e8c07cb70105e4e5d8e Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 28 May 2007 17:07:54 -0400
Subject: [PATCH] Added getmail module.
---
interface/lib/classes/db_mysql.inc.php | 28 ++++++++++++++++++++++------
1 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php
index bc26ac5..25ef131 100644
--- a/interface/lib/classes/db_mysql.inc.php
+++ b/interface/lib/classes/db_mysql.inc.php
@@ -147,6 +147,11 @@
return mysql_num_rows($this->queryId);
}
+ function affectedRows()
+ {
+ return mysql_affected_rows($this->linkId);
+ }
+
// returns mySQL insert id
function insertID()
{
@@ -256,12 +261,23 @@
foreach($columns as $col){
$sql .= $col["name"]." ".$this->mapType($col["type"],$col["typeValue"])." ";
- if($col["defaultValue"] != "") $sql .= "DEFAULT '".$col["defaultValue"]."' ";
- if($col["notNull"] == true) {
- $sql .= "NOT NULL ";
- } else {
- $sql .= "NULL ";
- }
+ if($col["defaultValue"] != "") {
+ if($col["defaultValue"] == "NULL" or $col["defaultValue"] == "NOT NULL") {
+ $sql .= "DEFAULT ".$col["defaultValue"]." ";
+ } else {
+ $sql .= "DEFAULT '".$col["defaultValue"]."' ";
+ }
+
+ } elseif($col["defaultValue"] != false) {
+ $sql .= "DEFAULT '' ";
+ }
+ if($col["defaultValue"] != "NULL" && $col["defaultValue"] != "NOT NULL") {
+ if($col["notNull"] == true) {
+ $sql .= "NOT NULL ";
+ } else {
+ $sql .= "NULL ";
+ }
+ }
if($col["autoInc"] == true) $sql .= "auto_increment ";
$sql.= ",";
// key Definitionen
--
Gitblit v1.9.1