/*************************************************************************** PHP mySQL db tool v1.0 (c) Kai Blankenhorn www.bitfolge.de/en kaib@bitfolge.de This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ***************************************************************************/ set_time_limit(60); $server = "localhost"; $user = ""; $pass = ""; $mysqldb = "search"; $rowsperpage = 50; // number of rows when browsing // do NOT change anything from here on if (empty($action)) { $action = "view"; } ?>
Please check the configuration data in $PHP_SELF!
"; die(); } if (empty($action)) { // select database on server echo("| Select database: | ".mysql_dbname($dbs,$i)." | "); } echo("
| Select table: | ".mysql_tablename($tables,$i)." | "); } echo("
|
// Page functions
if ($start>0) {?>
<< Vorherige |< Erste }?> |
- von |
if ($start+$rowsperpage<$total) {?>
Nächste >> Letzte >| } flush();?> | |
|
|||
|
flush();
if ($start>0) {?>
<< previous |< first }?> |
- von |
if ($start+$rowsperpage<$total) {?>
next >> last >| } flush(); ?> | |
Row update successful.
"); echo(""); echo(""); } else {?>Error while updating the row:
SQL command was:
} } echo ".";flush(); if ($action=="new1") { // create empty form for new data $erg = mysql_db_query($mysqldb,"SELECT * FROM $table"); echo("Row insert successful.
"); echo(""); echo(""); } else { echo("Error while inserting new row:
"); echo("".mysql_error()."
"); echo("SQL command was: $sql
"); echo(""); } die(); } echo ".";flush(); if ($action=="delete" AND $mysqldb!="" AND $table!="" AND $key!="" AND $record!="") { // delete row $sql = "DELETE FROM $table WHERE $key='$record'"; echo "$sqlRow delete successful.
"); echo(""); } else { echo("Error while deleting row:
"); echo("".mysql_error()."
"); echo("SQL command was: $sql
"); echo(""); } die(); } echo ".";flush(); ?>