Sql i internet
Download
1 / 20

SQL i internet - PowerPoint PPT Presentation


  • 74 Views
  • Uploaded on

SQL i internet. PHP i MySQL. Programy. MySQL: server WWW server Interpreter PHP Przeglądarka stron www. Programy MySQL. MySQL 5.0 Windows (x86) 5.0.22 36.7M http://www.mysql.com/ MySQL Administrator Windows (x86)1.1.95.0M http://www.mysql.com/

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' SQL i internet' - alden


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Sql i internet

SQL i internet

PHP i MySQL


Programy
Programy

  • MySQL: server

  • WWW server

  • Interpreter PHP

  • Przeglądarka stron www


Programy mysql
ProgramyMySQL

  • MySQL 5.0Windows (x86) 5.0.22 36.7Mhttp://www.mysql.com/

  • MySQL Administrator Windows (x86)1.1.95.0M http://www.mysql.com/

  • MySQL Querry Browser (x86)1.1.205.1M http://www.mysql.com/


Serwer www
Serwer www

  • Apache apache_1.3.35-win32-x86-src.msi www.apache.org

  • Microsoft Internet Information Server (IIS), Win 2000, Win XP www.microsoft.com

  • Microsoft Personal Web Server (PWS) Win98

  • Xitami.


Php 5 1 4 http www php net
PHP 5.1.4http://www.php.net/

  • PHP 5.1.4 ( współpracuje z MYSQL 5.0.18.nt)

  • Non-windows: Complete Source Code

  • PHP 5.1.4 (tar.bz2) [6,207Kb] - 04 May 2006PHP 5.1.4 (tar.gz) [7,920Kb] - 04 May 2006Windows Binaries

  • PHP 5.1.4 zip package [8,919Kb] - 04 May 2006md5: bf208201a671fd20a13490dc6f38b344

  • Collection of PECL modules for PHP 5.1.4 [2,227Kb] - 04 May 2006md5: ff5ac6c4db975bc3ff2f3a89b7881c3f

  • PHP 5.1.4 installer [2,639Kb] - 04 May 2006(CGI only, packaged as Windows installer to install and configure PHP, and automatically configure IIS, PWS and Xitami, with manual configuration for other servers. No external extensions included, get them from the zip and PECL downloads above, and install manually)md5: 86d83c9f42e281c60a40cf7c6d66db8d



Konfiguracja PHP i MySQLi

(bo to wersja PHP v 5 i MySQL v5

doc_root = c:\inetpub\wwwroot // for IIS/PWS


Konfiguracja MySQLi

(bo to wersja PHP v 5 i MySQL v5

Runtime Configuration

The behaviour of these functions is affected by settings in php.ini.

Table 158. MySQLi Configuration Options



Php hello php
PHP – Hello.php

<html>

<head>

<title>Test PHP</title>

</head>

<body>

<?php

echo "<p>Witaj na zajęciach POPOQ !</p>"; ?>

</body>

</html>



Php html
PHP -> HTML

<html>

<head>

<title>Test PHP</title>

</head>

<body>

<?php

echo "<p>Witaj na zajęciach POPOQ !</p>";

?>

</body>

</html>

<html>

<head>

<title>Test PHP</title>

</head>

<body>

<p>Witaj na zajęciach POPOQ !</p>

</body>

</html>


Sql i internet mysql php
SQL i internet :MySQL.PHP

<?php

////$link = mysql_connect(„serwer", "uzytkownik", "haslo”,” baza”)

printf ("Nowy przyklad");

$link = mysqli_connect("hefajstos", "popoq", "popoq", "popoq");

/* check connection */

if (mysqli_connect_errno())

{

printf("Connect failed: %s\n", mysqli_connect_error());

exit();

}


Sql i internet cd 1
SQL i internet cd.1

  • /* return name of current default database */

  • if ($result = mysqli_query($link, "SELECT DATABASE()"))

  • {

  • $row = mysqli_fetch_row($result);

  • printf("Default database is %s.\n", $row[0]);

  • mysqli_free_result($result);

  • }


Sql i internet cd2
SQL i internet cd2

  • /* change db to „popoq” db */

  • mysqli_select_db($link, "popoq");

  • /* return name of current default database */

  • if ($result = mysqli_query($link, "SELECT DATABASE()"))

  • {

  • $row = mysqli_fetch_row($result);

  • printf("Default database is %s.\n", $row[0]);

  • mysqli_free_result($result);

  • }


Sql i internet cd 3
SQL i internet cd 3

  • /* Wysyłanie zapytania SQL */

  • $query = "SELECT * FROM przedmioty";

  • $result = mysqli_query ($link, $query)

  • or die ("Zapytanie zakończone niepowodzeniem");


Php cd4
PHP cd4

  • /* Wyświetlenie wyników w HTML */

  • print "<HTML>\n";

  • print "<BODY>\n";

  • print "<table>\n";

  • while ($line = mysqli_fetch_array($result, MYSQLI_ASSOC))

  • {

  • print "\t<tr>\n";

  • foreach ($line as $col_value)

  • {

  • print "\t\t<td>$col_value</td>\n";

  • }

  • print "\t</tr>\n";

  • }

  • print "</table>\n";


Php cd5 fina
PHP cd5: finał

  • print "</BODY>\n";

  • print "</HTML>\n";

  • mysqli_close($link);

  • ?>



ad