Fixes
This commit is contained in:
parent
545286bd4e
commit
82c5f8b7a0
3 changed files with 29 additions and 6 deletions
|
|
@ -4,6 +4,7 @@ namespace PhangoApp\PhaModels\CoreFields;
|
|||
|
||||
use PhangoApp\PhaModels\CoreFields\CharField;
|
||||
use PhangoApp\PhaUtils\Utils;
|
||||
use PhangoApp\PhaI18n\I18n;
|
||||
|
||||
class IpField extends CharField {
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,13 @@ class SQLClass {
|
|||
$num_rows = mysqli_affected_rows(Webmodel::$connection[$server_data], $idconnection );
|
||||
|
||||
return $num_rows;
|
||||
}
|
||||
|
||||
static public function free_result($result)
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
static public function webtsys_close( $idconnection )
|
||||
|
|
|
|||
|
|
@ -521,7 +521,7 @@ class Webmodel {
|
|||
public function connect_to_db()
|
||||
{
|
||||
|
||||
include(__DIR__.'/Databases/'.Webmodel::$type_db.'.php');
|
||||
include_once(__DIR__.'/Databases/'.Webmodel::$type_db.'.php');
|
||||
|
||||
if(!SQLClass::webtsys_connect( Webmodel::$host_db[$this->db_selected], Webmodel::$login_db[$this->db_selected], Webmodel::$pass_db[$this->db_selected] , $this->db_selected))
|
||||
{
|
||||
|
|
@ -863,7 +863,7 @@ class Webmodel {
|
|||
public function insert($post, $safe_query=0, $cache_name='')
|
||||
{
|
||||
|
||||
$this->post=&$post;
|
||||
//$this->post=$post;
|
||||
|
||||
$this->set_phango_connection();
|
||||
|
||||
|
|
@ -944,7 +944,7 @@ class Webmodel {
|
|||
|
||||
public function update($post, $safe_query=0, $cache_name='')
|
||||
{
|
||||
$this->post=&$post;
|
||||
$this->post=$post;
|
||||
|
||||
$this->set_phango_connection();
|
||||
|
||||
|
|
@ -956,6 +956,7 @@ class Webmodel {
|
|||
|
||||
$arr_fields=array();
|
||||
|
||||
|
||||
//Unset the id field from the model for security
|
||||
|
||||
if(!$this->modify_id)
|
||||
|
|
@ -2340,6 +2341,20 @@ class Webmodel {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Close connection, you need this if use ReactPHP or some
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
public function close()
|
||||
{
|
||||
|
||||
Webmodel::$connection_func[$this->db_selected]='connect_to_db';
|
||||
|
||||
return SQLClass::webtsys_close(Webmodel::$connection[$this->db_selected]);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue