slawek Sat May 4 07:20:28 2002 EDT
Modified files:
/phpdoc/pl/reference/mysql reference.xml
/phpdoc/pl/reference/mysql/functions mysql-data-seek.xml
mysql-errno.xml
mysql-error.xml
mysql-escape-string.xml
mysql-fetch-field.xml
mysql-field-name.xml
mysql-field-type.xml
mysql-list-processes.xml
mysql-ping.xml
mysql-real-escape-string.xml
mysql-tablename.xml
mysql-thread-id.xml
Log:
Updated to old mysql.xml EN 1.101
Index: phpdoc/pl/reference/mysql/reference.xml
diff -u phpdoc/pl/reference/mysql/reference.xml:1.2
phpdoc/pl/reference/mysql/reference.xml:1.3
--- phpdoc/pl/reference/mysql/reference.xml:1.2 Tue Apr 16 20:05:29 2002
+++ phpdoc/pl/reference/mysql/reference.xml Sat May 4 07:20:27 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-2"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<reference id="ref.mysql">
<title>MySQL</title>
<titleabbrev>MySQL</titleabbrev>
@@ -157,19 +157,17 @@
<programlisting role="php">
<![CDATA[
<?php
-// ��czenie i wybranie bazy
-$link = mysql_connect("host", "login", "haslo")
+/* ��czenie i wybranie bazy */
+$link = mysql_connect("localhost", "uzytkownik", "haslo")
or die ("Nie mo�na si� po��czy�");
print ("Po��czenie nawi�zane");
-mysql_select_db ("baza")
- or die ("Nie mozna wybra� bazy danych");
+mysql_select_db ("baza") or die ("Nie mozna wybra� bazy danych");
-// Wysy�anie zapytania SQL
+/* Wysy�anie zapytania SQL */
$query = "SELECT * FROM tabela";
-$result = mysql_query ($query)
- or die ("Zapytanie zako�czone niepowodzeniem");
+$result = mysql_query ($query) or die ("Zapytanie zako�czone niepowodzeniem");
-// Wy�wietlenie wynik�w w HTML
+/* Wy�wietlenie wynik�w w HTML */
print "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
print "\t<tr>\n";
@@ -180,10 +178,10 @@
}
print "</table>\n";
-// Zwalnianie pami�ci
+/* Zwalnianie pami�ci */
mysql_free_result($result);
-// Roz��czanie
+/* Roz��czanie */
mysql_close($link);
?>
]]>
Index: phpdoc/pl/reference/mysql/functions/mysql-data-seek.xml
diff -u phpdoc/pl/reference/mysql/functions/mysql-data-seek.xml:1.2
phpdoc/pl/reference/mysql/functions/mysql-data-seek.xml:1.3
--- phpdoc/pl/reference/mysql/functions/mysql-data-seek.xml:1.2 Wed Apr 17 03:16:12
2002
+++ phpdoc/pl/reference/mysql/functions/mysql-data-seek.xml Sat May 4 07:20:27
+2002
@@ -42,8 +42,7 @@
$result = mysql_query($query)
or die("Zapytanie zako�czone niepowodzeniem");
- // pobieramy wiersze w odwrotnej kolejno�ci
-
+ /* pobieramy wiersze w odwrotnej kolejno�ci */
for ($i = mysql_num_rows($result) - 1; $i >=0; $i--) {
if (!mysql_data_seek($result, $i)) {
echo "Nie mo�na przej�� do wiersza $i\n";
Index: phpdoc/pl/reference/mysql/functions/mysql-errno.xml
diff -u phpdoc/pl/reference/mysql/functions/mysql-errno.xml:1.2
phpdoc/pl/reference/mysql/functions/mysql-errno.xml:1.3
--- phpdoc/pl/reference/mysql/functions/mysql-errno.xml:1.2 Wed Apr 17 03:16:12
2002
+++ phpdoc/pl/reference/mysql/functions/mysql-errno.xml Sat May 4 07:20:27 2002
@@ -34,7 +34,7 @@
<programlisting role="php">
<![CDATA[
<?php
-mysql_connect("serwer","uzytkownik","haslo");
+mysql_connect("nieistniejacyserwer");
echo mysql_errno().": ".mysql_error()."<BR>";
mysql_select_db("niematakiejbazy");
echo mysql_errno().": ".mysql_error()."<BR>";
Index: phpdoc/pl/reference/mysql/functions/mysql-error.xml
diff -u phpdoc/pl/reference/mysql/functions/mysql-error.xml:1.2
phpdoc/pl/reference/mysql/functions/mysql-error.xml:1.3
--- phpdoc/pl/reference/mysql/functions/mysql-error.xml:1.2 Wed Apr 17 03:16:12
2002
+++ phpdoc/pl/reference/mysql/functions/mysql-error.xml Sat May 4 07:20:27 2002
@@ -34,7 +34,7 @@
<programlisting role="php">
<![CDATA[
<?php
-mysql_connect("serwer","uzytkownik","haslo");
+mysql_connect("nieistniejacyserwer");
echo mysql_errno().": ".mysql_error()."<BR>";
mysql_select_db("niematakiejbazy");
echo mysql_errno().": ".mysql_error()."<BR>";
Index: phpdoc/pl/reference/mysql/functions/mysql-escape-string.xml
diff -u phpdoc/pl/reference/mysql/functions/mysql-escape-string.xml:1.2
phpdoc/pl/reference/mysql/functions/mysql-escape-string.xml:1.3
--- phpdoc/pl/reference/mysql/functions/mysql-escape-string.xml:1.2 Wed Apr 17
03:16:12 2002
+++ phpdoc/pl/reference/mysql/functions/mysql-escape-string.xml Sat May 4 07:20:27
+2002
@@ -39,10 +39,10 @@
<programlisting role="php">
<![CDATA[
<?php
- $link = mysql_connect('localhost', 'u�ytkownik', 'has�o');
- $item = "Zak's Laptop";
- $escaped_item = mysql_real_escape_string($item);
- printf ("�a�cuch ze znakami unikowymi: %s\n", $escaped_item);
+$link = mysql_connect('localhost', 'uzytkownik', 'haslo');
+$item = "Zak's Laptop";
+$escaped_item = mysql_real_escape_string($item);
+printf ("�a�cuch ze znakami unikowymi: %s\n", $escaped_item);
?>
]]>
</programlisting>
Index: phpdoc/pl/reference/mysql/functions/mysql-fetch-field.xml
diff -u phpdoc/pl/reference/mysql/functions/mysql-fetch-field.xml:1.2
phpdoc/pl/reference/mysql/functions/mysql-fetch-field.xml:1.3
--- phpdoc/pl/reference/mysql/functions/mysql-fetch-field.xml:1.2 Wed Apr 17
03:16:12 2002
+++ phpdoc/pl/reference/mysql/functions/mysql-fetch-field.xml Sat May 4 07:20:27
+2002
@@ -103,7 +103,7 @@
mysql_select_db("baza");
$result = mysql_query("select * from tabela")
or die("Zapytanie zako�czone niepowodzeniem");
-# pobieramy dane kolumny
+/* pobieramy dane kolumny */
$i = 0;
while ($i < mysql_num_fields($result)) {
echo "Informacje o kolumnie $i:<BR>\n";
@@ -111,7 +111,7 @@
if (!$meta) {
echo "Informacje niedost�pne<BR>\n";
}
- echo "<PRE>
+ echo "<pre>
blob: $meta->blob
max_length: $meta->max_length
multiple_key: $meta->multiple_key
@@ -124,7 +124,7 @@
unique_key: $meta->unique_key
unsigned: $meta->unsigned
zerofill: $meta->zerofill
-</PRE>";
+</pre>";
$i++;
}
mysql_free_result($result);
Index: phpdoc/pl/reference/mysql/functions/mysql-field-name.xml
diff -u phpdoc/pl/reference/mysql/functions/mysql-field-name.xml:1.2
phpdoc/pl/reference/mysql/functions/mysql-field-name.xml:1.3
--- phpdoc/pl/reference/mysql/functions/mysql-field-name.xml:1.2 Wed Apr 17
03:16:12 2002
+++ phpdoc/pl/reference/mysql/functions/mysql-field-name.xml Sat May 4 07:20:28
+2002
@@ -35,10 +35,11 @@
<programlisting role="php">
<![CDATA[
<?php
-// Tabela sk�ada si� z trzech p�l:
-// id_uzytkownika
-// nazwa_uzytkownika
-// haslo
+/* Tabela sk�ada si� z trzech p�l:
+ * id_uzytkownika
+ * nazwa_uzytkownika
+ * haslo
+ */
$link = mysql_connect('localhost', $uzytkownik, 'haslo');
mysql_select_db($dbname, $link)
or die("Nie mo�na otworzy� bazy $dbname");
Index: phpdoc/pl/reference/mysql/functions/mysql-field-type.xml
diff -u phpdoc/pl/reference/mysql/functions/mysql-field-type.xml:1.2
phpdoc/pl/reference/mysql/functions/mysql-field-type.xml:1.3
--- phpdoc/pl/reference/mysql/functions/mysql-field-type.xml:1.2 Wed Apr 17
03:16:12 2002
+++ phpdoc/pl/reference/mysql/functions/mysql-field-type.xml Sat May 4 07:20:28
+2002
@@ -35,14 +35,14 @@
$rows = mysql_num_rows($result);
$i = 0;
$table = mysql_field_table($result, $i);
-echo "Tabela '".$table."' ma ".$fields." p�l i ".$rows." wierszy <BR>";
-echo "Tabela ma nast�puj�ce pola <BR>";
+echo "Tabela '".$table."' ma ".$fields." p�l i ".$rows." wierszy <br />";
+echo "Tabela ma nast�puj�ce pola <br />";
while ($i < $fields) {
$type = mysql_field_type($result, $i);
$name = mysql_field_name($result, $i);
$len = mysql_field_len($result, $i);
$flags = mysql_field_flags($result, $i);
- echo $type." ".$name." ".$len." ".$flags."<BR>";
+ echo $type." ".$name." ".$len." ".$flags."<br />";
$i++;
}
mysql_close();
Index: phpdoc/pl/reference/mysql/functions/mysql-list-processes.xml
diff -u phpdoc/pl/reference/mysql/functions/mysql-list-processes.xml:1.2
phpdoc/pl/reference/mysql/functions/mysql-list-processes.xml:1.3
--- phpdoc/pl/reference/mysql/functions/mysql-list-processes.xml:1.2 Wed Apr 17
03:16:12 2002
+++ phpdoc/pl/reference/mysql/functions/mysql-list-processes.xml Sat May 4
+07:20:28 2002
@@ -26,7 +26,7 @@
<programlisting role="php">
<![CDATA[
<?php
-$link = mysql_connect('localhost', 'u�ytkownik', 'has�o');
+$link = mysql_connect('localhost', 'uzytkownik', 'haslo');
$result = mysql_list_processes($link);
while ($row = mysql_fetch_row($result)){
Index: phpdoc/pl/reference/mysql/functions/mysql-ping.xml
diff -u phpdoc/pl/reference/mysql/functions/mysql-ping.xml:1.2
phpdoc/pl/reference/mysql/functions/mysql-ping.xml:1.3
--- phpdoc/pl/reference/mysql/functions/mysql-ping.xml:1.2 Wed Apr 17 03:16:12
2002
+++ phpdoc/pl/reference/mysql/functions/mysql-ping.xml Sat May 4 07:20:28 2002
@@ -6,7 +6,7 @@
<refentry id="function.mysql-ping">
<refnamediv>
<refname>mysql_ping</refname>
- <refpurpose>Sprawdza po��czenie z serwerem, lub nazwi�zuje po��czenie, je�li go
nie by�o</refpurpose>
+ <refpurpose>Sprawdza po��czenie z serwerem, lub nawi�zuje po��czenie, je�li go
+nie by�o</refpurpose>
</refnamediv>
<refsect1>
<title>Opis</title>
@@ -17,13 +17,13 @@
</parameter></methodparam>
</methodsynopsis>
<para>
- <function>mysql_ping</function> checks whether or not the connection to
- the server is working. If it has gone down, an automatic reconnection is
- attempted. This function can be used by scripts that remain idle for a
- long while, to check whether or not the server has closed the connection
- and reconnect if necessary.
- <function>mysql_ping</function> returns &true; if the connection to the
- server is working, otherwise &false;.
+ <function>mysql_ping</function> sprawdza czy po��czenie z serwerem dzia�a
+ poprawnie. Je�li zosta�o zamkni�te, nast�puje pr�ba ponownego po��czenia.
+ Funkcja ta, w skryptach kt�re pozostaj� d�ugi czas w bezczynno�ci,
+ mo�e s�u�y� do sprawdzenia czy serwer zamkn�� po��czenie i, je�li zajdzie
+ potrzeba, nawi�zania go ponownie.
+ <function>mysql_ping</function> zwraca &true; je�li po��czenie z
+ serwerem dzia�a poprawnie, w przeciwnym przypadku zwraca &false;.
</para>
<para>
Patrz tak�e:
Index: phpdoc/pl/reference/mysql/functions/mysql-real-escape-string.xml
diff -u phpdoc/pl/reference/mysql/functions/mysql-real-escape-string.xml:1.2
phpdoc/pl/reference/mysql/functions/mysql-real-escape-string.xml:1.3
--- phpdoc/pl/reference/mysql/functions/mysql-real-escape-string.xml:1.2 Wed
Apr 17 03:16:12 2002
+++ phpdoc/pl/reference/mysql/functions/mysql-real-escape-string.xml Sat May 4
+07:20:28 2002
@@ -7,51 +7,52 @@
<refnamediv>
<refname>mysql_real_escape_string</refname>
<refpurpose>
- Escapes special characters in a string for use in a SQL statement, taking into
account the current charset of the connection.
+ Dodaje znaki unikowe dla potrzeb polece� SQL, bior�c po uwag� zestaw
+ znak�w u�ywany w po��czeniu.
</refpurpose>
</refnamediv>
<refsect1>
- <title>Description</title>
+ <title>Opis</title>
<methodsynopsis>
<type>string</type><methodname>mysql_real_escape_string</methodname>
-
<methodparam><type>string</type><parameter>unescaped_string</parameter></methodparam>
- <methodparam
choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam>
+
+<methodparam><type>string</type><parameter>�a�cuch_bez_znak�w_unikowych</parameter></methodparam>
+ <methodparam
+choice="opt"><type>resource</type><parameter>identyfikator_po��czeniar</parameter></methodparam>
</methodsynopsis>
<para>
- This function will escape special characters in the
- <parameter>unescaped_string</parameter>, taking into account the current
- charset of the connection so that it is safe to place it in a
- <function>mysql_query</function>.
+ Ta funkcja dodaje znaki unikowe do
+ <parameter>�a�cucha_bez_znak�w_unikowych</parameter>, maj�c na uwadze
+ aktualnie u�ywany w po��czeniu zestaw znak�w. Tak przygotowanego �a�cucha
+ mo�na bezpiecznie u�yc w funkcji <function>mysql_query</function>.
</para>
<note>
<simpara>
- <function>mysql_real_escape_string</function> does not escape
- <literal>%</literal> and <literal>_</literal>.
+ <function>mysql_real_escape_string</function> nie dodaje znak�w unikowych
+ przed <literal>%</literal> i <literal>_</literal>.
</simpara>
</note>
<example>
- <title><function>mysql_real_escape_string</function> example</title>
+ <title>przyk�ad u�ycia <function>mysql_real_escape_string</function></title>
<programlisting role="php">
<![CDATA[
<?php
-$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
+$link = mysql_connect('localhost', 'uzytkownik', 'haslo');
$item = "Zak's and Derick's Laptop";
$escaped_item = mysql_real_escape_string($item);
-printf ("Escaped string: %s\n", $escaped_item);
+printf ("Ze znakami unikowymi: %s\n", $escaped_item);
?>
]]>
</programlisting>
<para>
- The above example would produce the following output:
+ Powy�szy przyk�ad da nast�puj�cy wynik:
<screen>
<![CDATA[
-Escaped string: Zak\'s and Derick\'s Laptop
+Ze znakami unikowymi: Zak\'s and Derick\'s Laptop
]]>
</screen>
</para>
</example>
<para>
- See also:
+ Patrz tak�e:
<function>mysql_escape_string</function>
<function>mysql_character_set_name</function>
</para>
Index: phpdoc/pl/reference/mysql/functions/mysql-tablename.xml
diff -u phpdoc/pl/reference/mysql/functions/mysql-tablename.xml:1.2
phpdoc/pl/reference/mysql/functions/mysql-tablename.xml:1.3
--- phpdoc/pl/reference/mysql/functions/mysql-tablename.xml:1.2 Wed Apr 17 03:16:12
2002
+++ phpdoc/pl/reference/mysql/functions/mysql-tablename.xml Sat May 4 07:20:28
+2002
@@ -30,7 +30,7 @@
$i = 0;
for ($i = 0; $i < mysql_num_rows($result); $i++) {
$tb_names[$i] = mysql_tablename($result, $i);
- echo $tb_names[$i] . "<BR>";
+ echo $tb_names[$i] . "<br />";
}
?>
]]>
Index: phpdoc/pl/reference/mysql/functions/mysql-thread-id.xml
diff -u phpdoc/pl/reference/mysql/functions/mysql-thread-id.xml:1.2
phpdoc/pl/reference/mysql/functions/mysql-thread-id.xml:1.3
--- phpdoc/pl/reference/mysql/functions/mysql-thread-id.xml:1.2 Wed Apr 17 03:16:12
2002
+++ phpdoc/pl/reference/mysql/functions/mysql-thread-id.xml Sat May 4 07:20:28
+2002
@@ -6,41 +6,45 @@
<refentry id="function.mysql-thread-id">
<refnamediv>
<refname>mysql_thread_id</refname>
- <refpurpose>Return the current thread id</refpurpose>
+ <refpurpose>Zwraca id bie��cego w�tku</refpurpose>
</refnamediv>
<refsect1>
- <title>Description</title>
+ <title>Opis</title>
<methodsynopsis>
<type>int</type><methodname>mysql_thread_id</methodname>
- <methodparam
choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam>
+ <methodparam
+choice="opt"><type>resource</type><parameter>identyfikator_po��czenia</parameter></methodparam>
</methodsynopsis>
<para>
- <function>mysql_thread_id</function> returns the current thread id. If the
connection is lost and you reconnect with <function>mysql_ping</function>, the thread
ID will change. This means you should not get the thread ID and store it for later.
You should get it when you need it.
+ <function>mysql_thread_id</function> zwraca id bie��cego w�tku. Je�li
+ po��czenie zosta�o przerwane i nawi�zane ponownie przy u�yciu funkcji
+ <function>mysql_ping</function>, to id w�tku si� zmieni. Oznacza to, �e
+ nie powinno si� pobiera� id w�tku i zapisywa� do p�niejszego u�ycia, lecz
+ pobiera� zawsze, gdy jest potrzebny.
</para>
<example>
- <title><function>mysql_list_processes</function> example</title>
+ <title>przyk�ad u�ycia <function>mysql_list_processes</function></title>
<programlisting role="php">
<![CDATA[
<?php
-$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
+$link = mysql_connect('localhost', 'uzytkownik', 'haslo');
$thread_id = mysql_thread_id($link);
if ($thread_id){
- printf ("current thread id is %d\n", $thread_id);
+ printf ("id bie��cego w�tku: %d\n", $thread_id);
}
?>
]]>
</programlisting>
<para>
- The above example would produce the following output:
+ Powy�szy przyk�ad da nast�puj�cy wynik:
<screen>
<![CDATA[
-current thread id is 73
+id bie��cego w�tku: 73
]]>
</screen>
</para>
</example>
<para>
- See also:
+ Patrz tak�e:
<function>mysql_ping</function>
<function>mysql_list_processes</function>
</para>