if ($rows == 0) { save_new(); } }



Ähnliche Dokumente
php Hier soll ein Überblick über das Erstellen von php Programmen gegeben werden. Inhaltsverzeichnis 1.Überblick Parameterübergabe...


Exercise (Part II) Anastasia Mochalova, Lehrstuhl für ABWL und Wirtschaftsinformatik, Kath. Universität Eichstätt-Ingolstadt 1

7. Datenbank-Zugriff. Vorlesung und Übung Dr. Peter Pfahler Institut für Informatik Universität Paderborn. Zum Beispiel aus PHP-Skripten: Client 7-2

Interaktive Webseiten mit PHP und MySQL

ORM & OLAP. Object-oriented Enterprise Application Programming Model for In-Memory Databases. Sebastian Oergel

Leseprobe: SQL mit MySQL - Band 4 Kompendium mit Online-Übungs-DB. Kompendium zur schnellen Kurzinformation der Datenbanksprache SQL/MySQL 5.

Klausur in 13.2 Thema: Homepage mit MySQL und PHP (Bearbeitungszeit: 90 Minuten)

Softwareupdate-Anleitung // AC Porty L Netzteileinschub

MySQL: Einfaches Rechnen.

Datenbanken für Online Untersuchungen

Listening Comprehension: Talking about language learning

VGM. VGM information. HAMBURG SÜD VGM WEB PORTAL - USER GUIDE June 2016

Hands-on für UI5-Anwendung auf HANA

Shopware 4.1 Kategorien

Whitepaper. Produkt: combit Relationship Manager. Datensatzhistorie mit dem SQL Server 2000 und combit GmbH Untere Laube Konstanz

Fakultät für Informatik & Wirtschaftsinformatik DB & IS II - SS Metadaten

MySQL 101 Wie man einen MySQL-Server am besten absichert

Technical Support Information No. 123 Revision 2 June 2008

PHP und MySQL. Integration von MySQL in PHP. Zellescher Weg 12 Willers-Bau A109 Tel Michael Kluge (michael.kluge@tu-dresden.

10.6 Programmier-Exits für Workitems

Gesamtbeispiel zu PHP/PostgreSQL

p^db=`oj===pìééçêíáåñçêã~íáçå=

Dynamisches SQL. Folien zum Datenbankpraktikum Wintersemester 2009/10 LMU München

Dipl. Inf. Dipl. Math. Y. Orkunoglu Datum:

Order Ansicht Inhalt

ZENTRALER INFORMATIKDIENST DER JOHANNES KEPLER UNIVERSITÄT LINZ Abteilung Kundendienste und Dezentrale Systeme. PPP für Windows 3.

105.3 SQL-Datenverwaltung

MySQL Cluster und MySQL Proxy

MARKET DATA CIRCULAR DATA AMENDMENT

ajanzen.com Beispiele für den Umgang mit Feldsymbolen

Durchführung von Webprojekten. PHP und MySQL

Einführung in die Scriptsprache PHP

desk.modul : WaWi- Export

Datenbanken 1. Einführung und Zugänge für die eingesetzten Resourcen. ISWeb - Information Systems & Semantic Web University of Koblenz Landau, Germany

FLASH. Flash und Video. Flash und Video, macht das Sinn?

Exercise (Part XI) Anastasia Mochalova, Lehrstuhl für ABWL und Wirtschaftsinformatik, Kath. Universität Eichstätt-Ingolstadt 1

MobiDM-App Handbuch für Windows Mobile

Übung PL/SQL Trigger Lösungen

Kurzanleitung um Transponder mit einem scemtec TT Reader und der Software UniDemo zu lesen

Begleitskript. zum PHP/MySQL. Kurs

NVR Mobile Viewer for iphone/ipad/ipod Touch

Grundlagen der Informatik 2

MySQL Installation. AnPr

MySQL, phpmyadmin & SQL. Kurzübersicht

3. Persistenz und Datenbanken Content Providers. Content Providers. Generische Schnittstelle zum Zugriff auf Daten zwischen Anwendungen

<body> <h1>testseite für HTML-Parameter-Übergabe<br>50 Parameter werden übergeben</h1>

KIP Druckerstatus Benutzerhandbuch KIP Druckerstatus Installations- und Benutzerhandbuch

Beispiel 1: Filmdatenbank

E-Commerce: IT-Werkzeuge. Web-Programmierung. Kapitel 6: Datenbankabfragen mit SQL und PHP. Stand: Übung WS 2014/2015

10. Datenbanken und DBI Ties BerkeleyDB Datenbanken und DBI Oracle, Mysql und Proxy Server Ties tie

MIN oder MAX Bildung per B*Tree Index Hint


Datenbankentwicklung mit PureBasic

Installation mit Lizenz-Server verbinden

DataTables LDAP Service usage Guide

MySQL Queries on "Nmap Results"

SEMINAR Modifikation für die Nutzung des Community Builders

Bitte führen Sie die Installation in der hier beschriebene Reihenfolge aus!

PostgreSQL in großen Installationen

English. Deutsch. niwis consulting gmbh ( manual NSEPEM Version 1.0

WPF Bindung. Dr. Beatrice Amrhein

VGM. VGM information. HAMBURG SÜD VGM WEB PORTAL USER GUIDE June 2016

EEX Kundeninformation

Entwurf: opsi Erweiterung für Roaming Profiles

USB Treiber updaten unter Windows 7/Vista

Dokumentation für das Web-basierte Abkürzungsverzeichnis (Oracle mod_plsql / Apache)

PostgreSQL Wartungsstrategien

Installation MySQL Replikationsserver

PHP + MySQL. Die MySQL-Datenbank. Hochschule Karlsruhe Technik & Wirtschaft Internet-Technologien T3B250 SS2014 Prof. Dipl.-Ing.

Einführung in PHP und MySQL

Folgende Voraussetzungen für die Konfiguration müssen erfüllt sein: - Ein Bootimage ab Version Optional einen DHCP Server.

Log Parser 2.0 HackerScan.js. Beschreibung. Anforderungen. Unterstützte Plattformen. Script-Code. Zurück zur Übersichtsseite

Ich liebe Java && Ich liebe C# Rolf Borst

Um DynDNS zu konfigurieren, muss ausschließlich folgendes Menü konfiguriert werden:

Android VPN. Am Beispiel eines Netzwerktunnels für das Domain Name System (DNS) 1 Andiodine - Android DNS-VPN

Graphic Coding. Klausur. 9. Februar Kurs A

Python SVN-Revision 12

Therefore the respective option of the password-protected menu ("UPDATE TUBE DATA BASE") has to be selected:

iid software tools QuickStartGuide iid USB base driver installation

Suchmaschinen. Universität Augsburg, Institut für Informatik SS 2014 Prof. Dr. W. Kießling 23. Mai 2014 Dr. M. Endres, F. Wenzel Lösungsblatt 6

PostgreSQL unter Debian Linux

Nachtrag: Farben. Farbblindheit. (Light und Bartlein 2004)

User Manual BB-anywhere

Fachhochschule Kaiserslautern Labor Datenbanken mit MySQL SS2006 Versuch 1

Kopplung von Datenbanken

1. General information Login Home Current applications... 3

Die Datenmanipulationssprache SQL

Views in SQL. 2 Anlegen und Verwenden von Views 2

5.8 Bibliotheken für PostgreSQL

PHP und MySQL. Sicherheit und Session-Handling mit PHP. Zellescher Weg 12 Willers-Bau A109 Tel

Transkript:

Page 212, Listing index.php There is: Must be: // Prüfen, ob nicht Seite aktualisiert // wurde mit z.b. F5. der gleiche // Eintrag soll nicht mehrmals // gespeichert werden können $sql_check = "SELECT * FROM $tblname "; $sql_check.= "WHERE (what = '$fn_what' "; $sql_check.= "AND url = '$fn_url')"; $result_check = mysql_query($sql_check); $rows = mysql_num_rows($result_check); if ($rows == 0) { Page 214, Listing index.php There is: // Prüfen, ob nicht Seite aktualisiert // wurde mit z.b. F5. der gleiche // Eintrag soll nicht mehrmals // gespeichert werden können $sql_check = "SELECT * FROM $tblname "; $sql_check.= "WHERE (what = '$fn_what' "; $sql_check.= "AND url = '$fn_url')"; $result_check = mysql_query($sql_check); $rows = mysql_num_rows($result_check); if ($rows == 0) { Must be: // Wenn Aufforderung für neuen Eintrag kommt if (!empty($new)) { // Formular für Neueingabe aufbauen form_new(); Page 376 In Listing 5.39 it must be PRIMARY KEY (login_time) and not (period_of_time). Page 439 The field 'refer' in the SQL is not necessary because the result is always the server the application is installed on. This is also the reason to erase the entry 'localhost' in the sample recordset. Page 440 The path is: php_steps\statistic\step_04\language.sql

Page 441 The path is: php_steps\statistic\step_04\countries.sql Page 467 The listing to show month and day of month is: <TR> <?php //month and day of month //Monats- und Monatstaganzeige for ($i=0; $i < 10; $i++) { if ( $HTTP_GET_VARS[lang] == "de" ) { $month = date(j, $Last_10_days). ".". get_servermonth_de(); else { $month = date("m j", $Last_10_days); <TD CLASS="std-small" ALIGN="center"><?php echo $month;</td> <?php $Last_10_days = $Last_10_days + 86400; <TR> Page 469 The listing to get the visits sorted by hour is (beginning at row $hour_actually =...): $hour_actually = date(g, $total_end_time); // count hits // Zaehle Treffer $overall_h = mysql_num_rows($select_database); $t_hour = $hour_actually + 1; // result is midnight // Wenn das Ergebnis 24 Uhr ist if ($t_hour == 24) { $t_hour = 0; Page 470 The array $overall[count] is replaced in row 2 and 6 by $overall_h Page 471 The array $overall[count] is replaced in row 7 by $overall_h Page 476 This listing gets the hits for a path. After this the loaded pages are counted. // get the highest score of a path // Ermitteln der hoechsten Trefferzahl eines Pfades $query_score = "SELECT hit FROM $tbl_path ORDER BY hit DESC"; $result_score = mysql_query($query_score) or die($stats_select. $tbl_path. $stats_result); $datascore = mysql_fetch_array($result_score); $highscore = $datascore[hit]; // get the loaded pages // Ermitteln der genutzten/geladenen Seiten $query = "SELECT path, hit FROM $tbl_path ORDER BY hit DESC";

$result = mysql_query($query) or die($stats_select. $tbl_path. $stats_result); $number = mysql_num_rows($result); if ($number > 0 ) { $i=0; for($i=0; $i<$number; $i++) { $data=mysql_fetch_array($result); $name = $data[path]; $bar_size_percent = substr(100 * $data[hit] / $highscore, 0, 5); $bar_size = 250 * $bar_size_percent / 100; Page 487 This listing provides a new window: // get RIPE // Wenn User ueber RIPE... echo ("<A HREF=\"javascript:new_browser('".$cmd.$ip."&submit=Anfrage+senden')\">more...</A></TD>"); // get INTERNIC // Wenn User ueber INTERNIC... echo ("<A HREF=\"javascript:new_browser('".$cmd.$ip."&type=nameserver')\">more...</A></TD>"); // get ARIN // Wenn User ueber ARIN... echo ("<A HREF=\"javascript:new_browser('".$cmd.$ip."')\">more...</A></TD>"); // if nothing fits get APNIC // Im Zweifelsfall bei APNIC... echo ("<A HREF=\"javascript:new_browser('".$cmd.$ip."')\">more...</A></TD>"); Page 490 The rows $server=... and $domain=... are to be erased. $host_adress is to be replaced by $host. Before getting the value for $lang execute the following lines: if ( empty($host)) { $host = $ip; $lang gets its value now in a different way: $lang=substr(getenv('http_accept_language'),0,5); if (substr($lang,1,1)!="-" substr($lang,2,1)!="-") { $lang = substr($lang,0,2); The following code is also updated: // analyse the domain o get the ending // Zerlege die domain so, dass nur die Endung nach dem letzten Punkt // uebrig bleibt if ($host == "localhost") { $country="other"; else { $country=substr(strrchr($host,"."),1); Page 495 The row $domain_server =... is to be erased. To update the table countersys and to insert a recordset into table stats looks now like this: // check is OS is already in DB // Pruefe, ob OS schon auf der Datenbank oder neu ist

$Select_os = "SELECT type FROM $tbl_countersys WHERE (var = '$os')"; $result_os = mysql_query($select_os) or die($stats_select. $tbl_countersys. $stats_result); $number_os = mysql_num_rows($result_os); if ($number_os > 0) { $os_upd = "UPDATE $tbl_countersys "; $os_upd.= "SET count=count+1 "; $os_upd.= "WHERE (var='$os' AND type='os')"; mysql_query($os_upd) or die($stats_update. $tbl_countersys. $stats_result); else { // insert new OS into table countersys // Einfuegen eines neuen OS in countersys $os_upd_other = "UPDATE $tbl_countersys "; $os_upd_other.= "SET count=count+1 "; $os_upd_other.= "WHERE (var='other' AND type='os')"; mysql_query($os_upd_other) or die($stats_update. $tbl_countersys. $stats_result); // check if browser is already in db // Pruefe, ob Browser schon auf der Datenbank oder neu ist $Select_browser = "SELECT type FROM $tbl_countersys WHERE (var = '$browser')"; $result_browser = mysql_query($select_browser) or die($stats_select. $tbl_countersys. $stats_result); $number_browser = mysql_num_rows($result_browser); if ($number_browser > 0) { $browser_upd = "UPDATE $tbl_countersys "; $browser_upd.= "SET count=count+1 "; $browser_upd.= "WHERE (var='$browser' AND type='browser')"; mysql_query($browser_upd) or die($stats_update. $tbl_countersys. $stats_result); else { // insert new browser into table countersys // Einfuegen eines neuen Browser in countersys $browser_upd_other = "UPDATE $tbl_countersys "; $browser_upd_other.= "SET count=count+1 "; $browser_upd_other.= "WHERE (var='other' AND type='browser')"; mysql_query($browser_upd_other) or die($stats_update. $tbl_countersys. $stats_result); $count_upd = "UPDATE $tbl_countersys "; $count_upd.= "SET count=count+1 "; $count_upd.= "WHERE (type='total' AND var='hits')"; mysql_query($count_upd) or die($stats_update. $tbl_countersys. $stats_result); $received = getdate(); // insert data into table stats // In Tabelle stats einfuegen $count_insert = "INSERT INTO $tbl_stats "; $count_insert.= "(id, ip, "; $count_insert.= "received, os, "; $count_insert.= "browser, lang, host) "; $count_insert.= "values(0000, '$ip', $received[0], "; $count_insert.= "'$os', '$browser', '$lang', '$host')"; mysql_query($count_insert) or die($stats_insert. $tbl_stats. $stats_result); Page 502 The value must be 3599 instead of 3559: // calculate the time to get xx:59:59 // Berechne die Zeit, dass sich der Wert xx:59:59 ergibt

$end_hour = $full_hour + 3599;