| version 1.24, 2002/11/02 13:24:28 |
version 1.25, 2002/11/02 19:19:34 |
|
|
| * http://www.platon.sk/projects/phpMyEdit/ |
* http://www.platon.sk/projects/phpMyEdit/ |
| */ |
*/ |
| |
|
| /* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.23 2002/10/30 11:49:56 nepto Exp $ */ |
/* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.24 2002/11/02 13:24:28 nepto Exp $ */ |
| |
|
| /* phpMyEdit intro {{{ */ |
/* phpMyEdit intro {{{ */ |
| /* |
/* |
| Line 2658 echo '<h5>'.mysql_affected_rows ().' '.$ |
|
| Line 2658 echo '<h5>'.mysql_affected_rows ().' '.$ |
|
| } /* }}} */ |
} /* }}} */ |
| |
|
| /* |
/* |
| |
* Error handling function |
| |
*/ |
| |
function error($message) |
| |
{ |
| |
echo '<h1>phpMyEdit error: '.htmlspecialchars($message).'</h1>'."\n"; |
| |
return false; |
| |
} |
| |
|
| |
/* |
| * Database connection function |
* Database connection function |
| */ |
*/ |
| function connect() /* {{{ */ |
function connect() /* {{{ */ |
| { |
{ |
| if (!isset($this->db)) { |
if (!isset($this->db)) { |
| echo '<h1>phpMyEdit: no database defined</h1>'."\n"; |
$this->error('no database defined'); |
| return false; |
return false; |
| } |
} |
| if (!isset ($this->tb)) { |
if (!isset ($this->tb)) { |
| echo '<h1>phpMyEdit: no table defined</h1>'."\n"; |
$this->error('no table defined'); |
| return false; |
return false; |
| } |
} |
| |
|
| if ($dbl = @mysql_pconnect($this->hn, $this->un, $this->pw)) ; |
if ($dbl = @mysql_pconnect($this->hn, $this->un, $this->pw)) ; |
| else { |
else { |
| echo '<h1>phpMyEdit: could not connect to MySQL</h1>'."\n"; |
$this->error('could not connect to MySQL'); |
| return false; |
return false; |
| } |
} |
| |
|
| Line 2874 echo '<h5>'.mysql_affected_rows ().' '.$ |
|
| Line 2883 echo '<h5>'.mysql_affected_rows ().' '.$ |
|
| * Specific $fdd modifications depending on performed action |
* Specific $fdd modifications depending on performed action |
| */ |
*/ |
| |
|
| $this->recreate_displayed(); |
$this->recreate_fdd(); |
| |
|
| /* |
/* |
| * Extract SQL Field Names and number of fields |
* Extract SQL Field Names and number of fields |