/*************************************************************************** PHP mSQL 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"; $msqldb = "dbname"; if (empty($action)) { $action = "view"; } $rowsperpage = 50; // Datensätze pro Seite beim Browsen ?>
Überprüfen Sie die Einstellungen im oberen Teil der Datei db.php3!
"; die(); }*/ msql_connect($server); if (empty($action)) { // Datenbank auf Server auswählen echo("| Datenbank auswählen: | ".msql_dbname($dbs,$i)." | "); } echo("
| Tabelle auswählen: | ".msql_tablename($tables,$i)." | "); } echo("
|
// Blätterfunktionen
if ($start>0) {?>
<< Vorherige |< Erste }?> |
- von |
if ($start+$rowsperpage<$total) {?>
Nächste >> Letzte >| } flush();?> | |
|
|||
|
flush();
if ($start>0) {?>
<< Vorherige |< Erste }?> |
- von |
if ($start+$rowsperpage<$total) {?>
Nächste >> Letzte >| } flush(); ?> | |
Datensatz erfolgreich upgedatet.
"); echo(""); echo(""); } else {?>Fehler beim Update des Datensatzes:
SQL-Anweisung war:
} } echo ".";flush(); if ($action=="new1") { // Leeres Formular für neuen Datensatz anzeigen $erg = msql($msqldb,"SELECT * FROM $table"); echo("Datensatz erfolgreich eingefügt.
"); echo(""); echo(""); } else { echo("Fehler beim Einfügen des Datensatzes:
"); echo("".msql_error()."
"); echo("SQL-Anweisung war: $sql
"); echo(""); } die(); } echo ".";flush(); if ($action=="delete" AND $msqldb!="" AND $table!="" AND $key!="" AND $record!="") { // Datensatz löschen $sql = "DELETE FROM $table WHERE $key="; $del = msql($msqldb,"SELECT * FROM $table"); if (msql_fieldtype($del,0)=="int" OR msql_fieldtype($del,0)=="real") { $sql .=$record; } else { $sql .="'$record'"; } echo "$sqlDatensatz erfolgreich gelöscht.
"); echo(""); } else { echo("Fehler beim Löschen des Datensatzes:
"); echo("".msql_error()."
"); echo("SQL-Anweisung war: $sql
"); echo(""); } die(); } echo ".";flush(); ?>