version 1.33, 2002/12/02 23:13:31 |
version 1.34, 2002/12/03 21:13:08 |
|
|
* http://www.platon.sk/projects/phpMyEdit/ |
* http://www.platon.sk/projects/phpMyEdit/ |
*/ |
*/ |
|
|
/* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.32 2002/11/24 17:01:11 nepto Exp $ */ |
/* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.33 2002/12/02 23:13:31 nepto Exp $ */ |
|
|
/* phpMyEdit intro {{{ */ |
/* phpMyEdit intro {{{ */ |
/* |
/* |
Line 2288 function form_control(theForm) |
|
Line 2288 function form_control(theForm) |
|
$type = $this->fdd[$k]['type']; |
$type = $this->fdd[$k]['type']; |
if ($this->processed($k)) { |
if ($this->processed($k)) { |
$fd = $this->fds[$k]; |
$fd = $this->fds[$k]; |
// XXX: REMOVE ME! |
|
// $fn = $this->get_http_post_var_by_name($fd); |
|
$fn = $this->get_cgi_var($fd); |
$fn = $this->get_cgi_var($fd); |
/* |
/* |
if ($this->col_is_date($k)) |
if ($this->col_is_date($k)) |
Line 2766 echo '<h5>'.@mysql_affected_rows($this-> |
|
Line 2764 echo '<h5>'.@mysql_affected_rows($this-> |
|
echo "</pre>\n"; |
echo "</pre>\n"; |
*/ |
*/ |
|
|
|
// Let's do explicit quoting - it's safer |
|
set_magic_quotes_runtime(0); |
|
|
/* Database connection */ |
/* Database connection */ |
if ($this->connect() == false) |
if ($this->connect() == false) |
return false; |
return false; |
Line 3030 echo '<h5>'.@mysql_affected_rows($this-> |
|
Line 3031 echo '<h5>'.@mysql_affected_rows($this-> |
|
* Preparing some others values |
* Preparing some others values |
* (this was moved from execute() method) |
* (this was moved from execute() method) |
*/ |
*/ |
set_magic_quotes_runtime(0); // let's do explicit quoting ... it's safer |
|
|
|
// XXX fix this to use col_is_[type] |
// Setting key_delim according to key_type |
if (in_array($this->key_type, |
if ($this->key_type == 'real') { |
array('string','blob','date','time','datetime','timestamp','year'))) { |
/* If 'real' key_type does not work, |
$this->key_delim = '"'; |
try change MySQL datatype from float to double */ |
} else { |
$this->rec = doubleval($this->rec); |
$this->key_delim = ''; |
$this->key_delim = ''; |
$this->rec = intval($this->rec); // Fixed #523390 [7/8/2002] [1/2] |
} elseif ($this->key_type == 'int') { |
|
$this->rec = intval($this->rec); |
|
$this->key_delim = ''; |
|
} else { |
|
// XXX fix this to use col_is_[type] |
|
// if (in_array($this->key_type, |
|
// array('string','blob','date','time','datetime','timestamp','year'))) |
|
$this->key_delim = '"'; |
|
// $this->rec remains unmodified |
} |
} |
|
|
$this->gather_query_opts(); |
$this->gather_query_opts(); |