cvs: phpdoc /pl/reference/mysql reference.xml /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

From: Date: Sat, 04 May 2002 11:20:28 +0000
Subject: cvs: phpdoc /pl/reference/mysql reference.xml /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
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969345223@lists.php.net to get a copy of this message
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 &lt; $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>
« previous php.doc (#969345223) next »