|
|
|
|
|
|
103
|
$sqlValues .= "$valor,";
|
103
|
$sqlValues .= "$valor,";
|
|
104
|
}
|
104
|
}
|
|
105
|
elseif (substr_count(MYSQL_TYPES_DATE, "$tipo_col ")) {
|
105
|
elseif (substr_count(MYSQL_TYPES_DATE, "$tipo_col ")) {
|
|
106
|
- echo "<h2>$valor | $tipo_col</h2>";
|
|
|
|
107
|
$valor = $this->formatearFecha($valor, $tipo_col); // formatea las fechas
|
106
|
$valor = $this->formatearFecha($valor, $tipo_col); // formatea las fechas
|
|
108
|
|
107
|
|
|
109
|
$sqlValues .= "'$valor',";
|
108
|
$sqlValues .= "'$valor',";
|
|
|
|
|
|
|
117
|
$sqlValues = rtrim($sqlValues, ',').')';
|
116
|
$sqlValues = rtrim($sqlValues, ',').')';
|
|
118
|
|
117
|
|
|
119
|
// inserta los valores en la DB
|
118
|
// inserta los valores en la DB
|
|
120
|
- $sql = "INSERT INTO $tabla $cols VALUES $sqlValues";
|
|
|
|
121
|
- echo $sql;
|
|
|
|
|
|
119
|
+ $sql = "INSERT INTO $tabla $cols VALUES $sqlValues";
|
|
122
|
return $this->ejecutarConsulta($sql);
|
120
|
return $this->ejecutarConsulta($sql);
|
|
123
|
}
|
121
|
}
|
|
124
|
|
122
|
|
|
|
|
|
|
|
210
|
$valor = date("Y-m-d H:i:s",strtotime($valor));
|
208
|
$valor = date("Y-m-d H:i:s",strtotime($valor));
|
|
211
|
}
|
209
|
}
|
|
212
|
}
|
210
|
}
|
|
213
|
- echo "<h4>($valor)</h4>";
|
|
|
|
214
|
return $valor;
|
211
|
return $valor;
|
|
215
|
/* if (gettype($valor) == 'string') $valor = strtotime($valor);
|
212
|
/* if (gettype($valor) == 'string') $valor = strtotime($valor);
|
|
216
|
return date('Y-m-d H:i:s', $valor);
|
213
|
return date('Y-m-d H:i:s', $valor);
|