cvs: phpdoc /en/functions mysql.xml

From: Date: Thu, 30 Aug 2001 16:35:10 +0000
Subject: cvs: phpdoc /en/functions mysql.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969337339@lists.php.net to get a copy of this message
kgergely Thu Aug 30 12:35:10 2001 EDT Modified files: /phpdoc/en/functions mysql.xml Log:

Index: phpdoc/en/functions/mysql.xml diff -u phpdoc/en/functions/mysql.xml:1.59 phpdoc/en/functions/mysql.xml:1.60 --- phpdoc/en/functions/mysql.xml:1.59 Sun Aug 19 07:47:42 2001 +++ phpdoc/en/functions/mysql.xml Thu Aug 30 12:35:09 2001 @@ -1,79 +1,44 @@ -<?xml encoding="iso-8859-1"?> -<!-- $Revision: 1.59 $ --> +<!-- xml version 1.35 --> <reference id="ref.mysql"> - <title>MySQL functions</title> + <title>MySQL függvények</title> <titleabbrev>MySQL</titleabbrev> <partintro> <simpara> - These functions allow you to access MySQL database servers. In - order to have these functions available, you must compile php - with MySQL support by using the - <option role="configure">--with-mysql</option> option. If you - use this option without specifying the path to MySQL, php will - use the built-in MySQL client libraries. Users who run other - applications that use MySQL (for example, running php3 and php4 - as concurrent apache modules, or auth-mysql) should always - specify the path to MySQL: - <option role="configure">--with-mysql=/path/to/mysql</option>. - This will force php to use the client libraries installed by - MySQL, avoiding any conflicts. + E függvények segítségével érheted el a MySQL adatbázisokat. Ahhoz, hogy + ezeket a függvényeket használhasd, a php-t a + <option role="configure">--with-mysql</option> opcióval kell lefordítanod. + Ha nem adod meg az opció után a mysql elérési útvonalát, akkor a php a + beépített mysql kliens könyvtárat fogja használni. Ha a felhasználók más + alkalmazásokat is használnak, amelyek mysql-t használnak (például a php + 3-as és 4-es verzióját, vagy az auth-mysql-t), akkor mindig meg kell adni + a mysql elérési útvonalát a + <option role="configure">--with-mysql=/path/to/mysql</option> formában. + Ez ki fogja kényszeríteni, hogy a meglévõ mysql kliens könyvtárat + használja a php, elkerülve az ebbõl adódó ütközéseket. </simpara> <simpara> - More information about MySQL can be found at <ulink - url="&url.mysql;">&url.mysql;</ulink>. + A MySQL-rõl további információt a + <ulink url="&url.mysql;">&url.mysql;</ulink> címen találsz. </simpara> <simpara> - Documentation for MySQL can be found at <ulink + A MySQL dokumentációját pedig a <ulink url="&url.mysql.docs;">&url.mysql.docs;</ulink>. </simpara> - <para> - This simple example shows how to connect, execute a query, print - resulting rows and disconnect from MySQL Database. - <example> - <title>MySQL extension overview example</title> - <programlisting role="php"> -&lt;?php - $link = mysql_connect("mysql_host", "mysql_login", "mysql_password") - or die ("Could not connect"); - print ("Connected successfully"); - mysql_select_db ("my_database") - or die ("Could not select database"); - - $query = "SELECT * FROM my_table"; - $result = mysql_query ($query) - or die ("Query failed"); - - // printing HTML result - - print "&lt;table&gt;\n"; - while($line = mysql_fetch_array($result)){ - print "\t&lt;tr&gt;\n"; - while(list($col_name, $col_value) = each($line)){ - print "\t\t&lt;td&gt;$col_value&lt;/td&gt;\n"; - } - print "\t&lt;/tr&gt;\n"; - } - print "&lt;/table&gt;\n"; - - mysql_close($link); -?&gt; - </programlisting> - </example> - </para> + </partintro> <refentry id="function.mysql-affected-rows"> <refnamediv> <refname>mysql_affected_rows</refname> - <refpurpose>Get number of affected rows in previous MySQL - operation</refpurpose> + <refpurpose>Az elõzõ MySQL mûveletben érintett sorok számát adja + meg</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>int <function>mysql_affected_rows</function></funcdef> - <paramdef>resource + <paramdef>int <parameter> <optional>link_identifier</optional> </parameter> @@ -81,44 +46,31 @@ </funcprototype> </funcsynopsis> <para> - <function>mysql_affected_rows</function> returns the number - of rows affected by the last INSERT, UPDATE or DELETE query - associated with <parameter>link_identifier</parameter>. If the - link identifier isn't specified, the last link opened by - <function>mysql_connect</function> is assumed. - </para> - <note> - <para> - If you are using transactions, you need to call - <function>mysql_affected_rows</function> after your INSERT, - UPDATE, or DELETE query, not after the commit. - </para> - </note> - <para> - If the last query was a DELETE query with no WHERE clause, all - of the records will have been deleted from the table but this - function will return zero. + A <function>mysql_affected_rows</function> függvény az elõzõ + link_identifier-rel azonosított kapcsolatban kiadott INSERT, + UPDATE vagy DELETE kérésben érintett sorok számát adja vissza. + Ha nem adsz meg kapcsolat-azonosítót, akkor az utoljára megnyitott + kapcsolatról kapsz információt. </para> <note> <para> - When using UPDATE, MySQL will not update columns where the new - value is the same as the old value. This creates the possiblity - that <function>mysql_affected_rows</function> may not actually - equal the number of rows matched, only the number of rows that - were literally affected by the query. + Ha transzakciókezelést hasznnálsz, akkor a + <function>mysql_affected_rows</function> függvényt az INSERT, UPDATE, + vagy DELETE kérés után közvetlenül, nem a kommit után kell meghívni. </para> </note> <para> - <function>mysql_affected_rows</function> does not work with - SELECT statements; only on statements which modify records. To - retrieve the number of rows returned by a SELECT, use - <function>mysql_num_rows</function>. + Ha az utolsó lekérdezés egy WHERE feltétel nélküli DELETE volt, akkor bár + a táblából minden sor törlõdik, a függvény nullát fog visszaadni. </para> <para> - If the last query failed, this function will return -1. + Ez a parancs nem hatékony a lekérdezõ SELECT kéréssel együtt használva, + csak azokkal a lekérdezésekkel, melyek módosítják a táblázat sorait. + Ha egy SELECT lekérdezésben kapott sorok számát szeretnéd megkapni, + akkor használd a <function>mysql_num_rows</function> függvényt. </para> <para> - See also: <function>mysql_num_rows</function>. + Ha az utolsó kérés meghiusul, akkor a függvény -1-gyel tér vissza. </para> </refsect1> </refentry> @@ -127,11 +79,11 @@ <refnamediv> <refname>mysql_change_user</refname> <refpurpose> - Change logged in user of the active connection + Aktív kapcsolat felhasználójának módosítása </refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>int <function>mysql_change_user</function></funcdef> @@ -142,7 +94,7 @@ <optional>database</optional> </parameter> </paramdef> - <paramdef>resource + <paramdef>int <parameter> <optional>link_identifier</optional> </parameter> @@ -150,17 +102,13 @@ </funcprototype> </funcsynopsis> <para> - <function>mysql_change_user</function> changes the logged in user - of the current active connection, or the connection given by the - optional parameter link_identifier. If a database is - specified, this will default or current database after the user - has been changed. If the new user and password authorization fails, - the current connected user stays active.</para> - - <!-- what is returned? bool -> succes/failure i suppose? --> - - <note><para>This function was introduced in PHP 3.0.13 and - requires MySQL 3.23.3 or higher. + A <function>mysql_change_user</function> függvény megváltoztatja az + aktuális, vagy az opcionális paraméterben megadott azonosítójú kapcsolat + felhasználóját. Ha egy adatbázis nevét megadod, akkor ez lesz az + alapértelmezett adatbázis. Ha az új név-jelszó páros helytelen, akkor a + függvényhívás elõtti kapcsolat él tovább.</para> + <note><para>A függvény a PHP 3.0.13 változatával került a nyelvbe és + MySQL 3.23.3, vagy késõbbi változata szükséges a használatához. </para></note> </refsect1> </refentry> @@ -168,14 +116,14 @@ <refentry id="function.mysql-close"> <refnamediv> <refname>mysql_close</refname> - <refpurpose>Close MySQL connection</refpurpose> + <refpurpose>Lezár egy MySQL kapcsolatot</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> - <funcdef>bool <function>mysql_close</function></funcdef> - <paramdef>resource + <funcdef>int <function>mysql_close</function></funcdef> + <paramdef>int <parameter> <optional>link_identifier</optional> </parameter> @@ -183,40 +131,38 @@ </funcprototype> </funcsynopsis> <para> - Returns: &true; on success, &false; on error. + A függvény értéke igaz, ha a mûvelet sikerült, hamis, ha nem. </para> - <para> <function>mysql_close</function> closes the connection to - the MySQL server that's associated with the specified link - identifier. If <parameter>link_identifier</parameter> isn't - specified, the last opened link is used. + <para>A <function>mysql_close</function> függvény bezárja az adott + azonosítójú MySQL kapcsolatot. Ha nem adsz meg + <parameter>link_identifier</parameter> paramétert, akkor az utoljára + megnyitott kapcsolatot zárja le. </para> <para> - Using <function>mysql_close</function> isn't usually necessary, - as non-persistent open links are automatically closed at the end - of the script's execution. See also - <link linkend="language.types.resource.self-destruct">freeing - resources</link>. + A <function>mysql_close</function> függvény használata általában + szükségtelen, mert a nem perzisztens kapcsolatok a szkript végén + bezáródnak. </para> <note> <para> - <function>mysql_close</function> will not close persistent links - created by <function>mysql_pconnect</function>. + A <function>mysql_close</function> függvény nem zárja be a + <function>mysql_pconnect</function> függvénnyel megnyitott kapcsolatokat. </para> </note> <example> - <title>MySQL close example</title> + <title>MySQL close példa</title> <programlisting role="php"> &lt;?php - $link = mysql_connect ("kraemer", "marliesle", "secret") - or die ("Could not connect"); - print ("Connected successfully"); + $link = mysql_connect ("kraemer", "marliesle", "titok") + or die ("Nem lehet csatlakozni"); + print ("A csatlakozás sikerült"); mysql_close ($link); ?&gt; </programlisting> </example> <para> - See also: <function>mysql_connect</function>, and - <function>mysql_pconnect</function>. + Lásd még a <function>mysql_connect</function> és a + <function>mysql_pconnect</function> függvényeket! </para> </refsect1> </refentry> @@ -224,13 +170,13 @@ <refentry id="function.mysql-connect"> <refnamediv> <refname>mysql_connect</refname> - <refpurpose>Open a connection to a MySQL Server</refpurpose> + <refpurpose>Kapcsolatot nyit meg egy MySQL szerverhez</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> - <funcdef>resource <function>mysql_connect</function></funcdef> + <funcdef>int <function>mysql_connect</function></funcdef> <paramdef>string <parameter> <optional>hostname @@ -252,61 +198,60 @@ </funcprototype> </funcsynopsis> <para> - Returns a MySQL link identifier on success, or &false; on failure. - </para> - <para> - <function>mysql_connect</function> establishes a connection - to a MySQL server. The following defaults are assumed for - missing optional parameters: <parameter>host:port</parameter> = - 'localhost:3306', <parameter>username</parameter> = name of the - user that owns the server process and - <parameter>password</parameter> = empty password. + Pozitív MySQL azonosítóval tér vissza, ha a csatlakozás sikerült. Hiba + esetén pedig hibaüzenetet ír a kimenetre és 0-val tér vissza. </para> <para> - The hostname string can also include a port - number. eg. &quot;hostname:port&quot; or a path to a socket - eg. &quot;:/path/to/socket&quot; for the localhost. + A <function>mysql_connect</function> függvény kapcsolatot nyit meg egy + MySQL szerverhez. A paramétereket elhagyhatod. Az alapértelmezett + értékek: <parameter>host:port</parameter> = 'localhost:3306', + <parameter>username</parameter> = a folyamat tulajdonosának belépési neve + <parameter>password</parameter> = üres karakterlánc. + </para> + <para> + A hostname paraméter tartalmazhat egy portszámot is, például: + &quot;hostname:port&quot; vagy tartalmazhatja a MySQL socket elérési + útvonalát, például: &quot;:/path/to/socket&quot;. Az utóbbi hostname + paramétert használva is a helyi MySQL szerverhez próbál majd kapcsolódni + a függvény. <note> <para> - Support for &quot;:port&quot; was added in PHP 3.0B4. + A &quot;:port&quot; formátumú kiegészítés a PHP 3.0B4-es változatában + került a nyelvbe. </para> <para> - Support for &quot;:/path/to/socket&quot; was added in - PHP 3.0.10. + A &quot;:/path/to/socket&quot; formát pedig a PHP 3.0.10-es verziójától + kezdve használhatjuk. </para> <para> - You can suppress the error message on failure by prepending '@' - to the function name. + A sikertelen kapcsolatkor kiírt hibaüzenetet elnyomhatod, ha '@' jelet + írsz a függvény elé. </para> </note> </para> <para> - If a second call is made to <function>mysql_connect</function> - with the same arguments, no new link will be established, but - instead, the link identifier of the already opened link will be - returned. + Ha a <function>mysql_connect</function> függvényt kétszer ugyanazokkal a + paraméterekkel hívod meg, akkor nem jön létre újabb kapcsolat; a függvény + a már meglévõ kapcsolat azonosítóját fogja visszaadni. </para> <para> - The link to the server will be closed as soon as the execution of - the script ends, unless it's closed earlier by explicitly calling - <function>mysql_close</function>. + A kapcsolat a PHP program végén bezárul, ha elõbb nem zártuk volna le a + <function>mysql_close</function> függvénnyel. </para> <example> - <title>MySQL connect example</title> + <title>MySQL connect példa</title> <programlisting role="php"> &lt;?php - - $link = mysql_connect ("localhost", "username", "secret") - or die ("Could not connect"); - print ("Connected successfully"); + $link = mysql_connect ("kraemer", "marliesle", "titok") + or die ("Nem lehet csatlakozni"); + print ("A csatlakozás sikerült"); mysql_close ($link); - ?&gt; </programlisting> </example> - <para> See also - <function>mysql_pconnect</function>, and - <function>mysql_close</function>. + <para> Lásd még a + <function>mysql_pconnect</function> és + <function>mysql_close</function> függvényeket. </para> </refsect1> </refentry> @@ -314,15 +259,15 @@ <refentry id="function.mysql-create-db"> <refnamediv> <refname>mysql_create_db</refname> - <refpurpose>Create a MySQL database</refpurpose> + <refpurpose>Létrehoz egy MySQL adatbázist</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>int <function>mysql_create_db</function></funcdef> <paramdef>string <parameter>database name</parameter></paramdef> - <paramdef>resource + <paramdef>int <parameter> <optional>link_identifier</optional> </parameter> @@ -330,31 +275,29 @@ </funcprototype> </funcsynopsis> <para> - <function>mysql_create_db</function> attempts to create a new - database on the server associated with the specified link - identifier. + A <function>mysql_create_db</function> függvény megkísérel létrehozni egy + új adatbázist a megadott kapcsolatazonosítón keresztül. </para> - <!-- returns?? bool -> succes? --> <example> - <title>MySQL create database example</title> + <title>MySQL 'create database' példa</title> <programlisting role="php"> &lt;?php $link = mysql_pconnect ("kron", "jutta", "geheim") - or die ("Could not connect"); + or die ("Nem lehet csatlakozni") if (mysql_create_db ("my_db")) { - print ("Database created successfully\n"); + print ("Az adatbázist létrehoztam\n"); } else { - printf ("Error creating database: %s\n", mysql_error ()); + printf ("Hiba az adatbázis létrehozásakor: %s\n", mysql_error ()); } ?&gt; </programlisting> </example> <para> - For downwards compatibility <function>mysql_createdb</function> - can also be used. + Kompatíbilitási okokból a <function>mysql_createdb</function> függvény is + használható. </para> <para> - See also: <function>mysql_drop_db</function>. + Lásd még a: <function>mysql_drop_db</function> függvényt. </para> </refsect1> </refentry> @@ -362,59 +305,60 @@ <refentry id="function.mysql-data-seek"> <refnamediv> <refname>mysql_data_seek</refname> - <refpurpose>Move internal result pointer</refpurpose> + <refpurpose>Belsõ eredménymutató mozgatása</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> - <funcdef>bool <function>mysql_data_seek</function></funcdef> - <paramdef>resource <parameter>result_identifier</parameter></paramdef> + <funcdef>int <function>mysql_data_seek</function></funcdef> + <paramdef>int <parameter>result_identifier</parameter></paramdef> <paramdef>int <parameter>row_number</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - Returns: &true; on success, &false; on failure. + Igazzal tér vissza, ha a mûvelet sikerült </para> <para> - <function>mysql_data_seek</function> moves the internal row - pointer of the MySQL result associated with the specified result - identifier to point to the specified row number. The next call - to <function>mysql_fetch_row</function> would return that row. + A <function>mysql_data_seek</function> függvény az adott azonosítójú + ereményhalmazban ugrik a megadott pozícióra. + A <function>mysql_fetch_row</function> függvény következõ hívásakor ezt a + sorszámú sort kapod meg. </para> <para> - <parameter>Row_number</parameter> starts at 0. + Ha az elsõ sorra akarsz pozicionálni, akkor + <parameter>Row_number</parameter> 0 legyen! </para> <example> - <title>MySQL data seek example</title> + <title>MySQL data seek példa</title> <programlisting role="php"> &lt;?php $link = mysql_pconnect ("kron", "jutta", "geheim") - or die ("Could not connect"); + or die ("Nem tudok csatlakozni"); mysql_select_db ("samp_db") - or die ("Could not select database"); + or die ("Nem tudok belépni az adatbázisba"); $query = "SELECT last_name, first_name FROM friends"; - $result = mysql_query ($query) - or die ("Query failed"); + $eredmeny = mysql_query ($query) + or die ("Rossz kérés"); # fetch rows in reverse order - for ($i = mysql_num_rows ($result) - 1; $i >=0; $i--) { - if (!mysql_data_seek ($result, $i)) { - echo "Cannot seek to row $i\n"; + for ($i = mysql_num_rows ($eredmeny) - 1; $i &gt;=0; $i--) { + if (!mysql_data_seek ($eredmeny, $i)) { + printf ("Nem tudok a %d. sorra ugorni\n", $i); continue; } - if(!($row = mysql_fetch_object ($result))) + if(!($sor = mysql_fetch_object ($eredmeny))) continue; - echo ("$row-&gt;last_name $row-&gt;first_name&lt;BR&gt;\n"; + printf ("%s %s&lt;BR&gt;\n", $sor-&gt;last_name, $sor-&gt;first_name); } - mysql_free_result ($result); + mysql_free_result ($eredmeny); ?&gt; </programlisting> </example> @@ -427,11 +371,11 @@ <refpurpose>Get result data</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> - <funcdef>string <function>mysql_db_name</function></funcdef> - <paramdef>resource <parameter>result</parameter></paramdef> + <funcdef>int <function>mysql_db_name</function></funcdef> + <paramdef>int <parameter>result</parameter></paramdef> <paramdef>int <parameter>row</parameter></paramdef> <paramdef>mixed <parameter> @@ -441,27 +385,26 @@ </funcprototype> </funcsynopsis> <para> - <function>mysql_db_name</function> takes as its first parameter - the result pointer from a call to - <function>mysql_list_dbs</function>. The - <parameter>row</parameter> parameter is an index into the result - set. + A <function>mysql_db_name</function> függvény elsõ paramétere egy + <function>mysql_list_dbs</function> által visszaadott érték. A + <parameter>row</parameter> paraméter az eredményhalmaz indexe. </para> <para> - If an error occurs, &false; is returned. Use - <function>mysql_errno</function> and - <function>mysql_error</function> to determine the nature of the - error. + Ha hiba történt, a függvény FALSE-szal tér vissza. + Használd a + <function>mysql_errno</function> és a + <function>mysql_error</function> függvényeket a hiba eredetének + megállapítására! </para> <example> - <title><function>mysql_db_name</function> example</title> + <title><function>Mysql_db_name</function> példa</title> <programlisting role="php"> &lt;?php error_reporting(E_ALL); -mysql_connect('dbhost', 'username', 'password'); +mysql_connect('dbhost', 'név', 'jelszó'); $db_list = mysql_list_dbs(); $i = 0; @@ -475,8 +418,8 @@ </example> <para> - For backward compatibility, <function>mysql_dbname</function> is - also accepted. This is deprecated, however. + Kompatíbilitási okokból a <function>mysql_dbname</function> függvény is + használható, de használata nem javasolt. </para> </refsect1> @@ -485,16 +428,16 @@ <refentry id="function.mysql-db-query"> <refnamediv> <refname>mysql_db_query</refname> - <refpurpose>Send a MySQL query</refpurpose> + <refpurpose>MySQL kérést küld az adatbázisnak</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> - <funcdef>resource <function>mysql_db_query</function></funcdef> + <funcdef>int <function>mysql_db_query</function></funcdef> <paramdef>string <parameter>database</parameter></paramdef> <paramdef>string <parameter>query</parameter></paramdef> - <paramdef>resource + <paramdef>int <parameter> <optional>link_identifier</optional> </parameter> @@ -502,29 +445,22 @@ </funcprototype> </funcsynopsis> <para> - Returns: A positive MySQL result resource to the query result, - or &false; on error. + Visszatérési értéke egy pozitív MySQL eredmény-azonosító, ha a kérés + sikeres volt, hamissal, ha a kérés hibás volt. </para> <para> - <function>mysql_db_query</function> selects a database and - executes a query on it. If the optional link identifier isn't - specified, the function will try to find an open link to the - MySQL server and if no such link is found it'll try to create one - as if <function>mysql_connect</function> was called with no - arguments + A <function>mysql_db_query</function> függvény kiválaszt egy adatbázist, + majd azon végrehajt egy kérést. Ha a kapcsolat azonosító nincs megadva, + akkor a függvény keres egyet. Ha nem talál ilyet, akkor megpróbál + létrehozni egyet oly módon, mintha meghívta volna a + <function>mysql_connect</function> függvényt paraméterek nélkül. </para> <para> - See also <function>mysql_connect</function> and - <function>mysql_query</function>. + Lásd még a <function>mysql_connect</function> függvényt. </para> <para> - <note> - <simpara> - This function has been deprecated since PHP 4.0.6. - Do not use this function. Use <function>mysql_select_db</function> - and <function>mysql_query</function> instead. - </simpara> - </note> + Kompatíbilitási okokból a <function>mysql</function> függvény is + használható. </para> </refsect1> </refentry> @@ -532,15 +468,15 @@ <refentry id="function.mysql-drop-db"> <refnamediv> <refname>mysql_drop_db</refname> - <refpurpose>Drop (delete) a MySQL database</refpurpose> + <refpurpose>Töröl egy MySQL adatbázist</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> - <funcdef>bool <function>mysql_drop_db</function></funcdef> + <funcdef>int <function>mysql_drop_db</function></funcdef> <paramdef>string <parameter>database_name</parameter></paramdef> - <paramdef>resource + <paramdef>int <parameter> <optional>link_identifier</optional> </parameter> @@ -548,16 +484,16 @@ </funcprototype> </funcsynopsis> <para> - Returns: &true; on success, &false; on failure. + Visszatérési értéke: igaz, ha sikeres, hamis, ha nem </para> <para> - <function>mysql_drop_db</function> attempts to drop (remove) an - entire database from the server associated with the specified - link identifier. + A <function>mysql_drop_db</function> függvény megpróbálja az egész + adatbázist kitörölni, melyet az adott kapcsolat-azonosító határoz meg. </para> <para> - See also: <function>mysql_create_db</function>. For downward - compatibility <function>mysql_dropdb</function> can also be used. + Lásd még a <function>mysql_create_db</function> függvényt. + Kompatíbilitási okokból <function>mysql_dropdb</function> néven is + hívható a függvény. [és hallgat is a nevére] </para> </refsect1> </refentry> @@ -565,15 +501,14 @@ <refentry id="function.mysql-errno"> <refnamediv> <refname>mysql_errno</refname> - <refpurpose>Returns the numerical value of the error message from previous - MySQL operation</refpurpose> + <refpurpose>Az elõzõ MySQL mûvelet hibakódját tartalmazza</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>int <function>mysql_errno</function></funcdef> - <paramdef>resource + <paramdef>int <parameter> <optional>link_identifier</optional> </parameter> @@ -581,18 +516,20 @@ </funcprototype> </funcsynopsis> <para> - Returns the error number from the last MySQL function, or - <literal>0</literal> (zero) if no error occurred. + Az utoljára végrehajtott MySQL hiba kódjával tér vissza, vagy ha az + sikeres volt, akkor <literal>0</literal>-t (nullát) ad vissza. </para> <para> - Errors coming back from the MySQL database backend no longer - issue warnings. Instead, use <function>mysql_errno</function> to - retrieve the error code. Note that this function only returns the - error code from the most recently executed MySQL function (not - including <function>mysql_error</function> and - <function>mysql_errno</function>), so if you want to use it, - make sure you check the value before calling another mySQL - function. + A MySQL hibái már nem jelennek meg figyelmeztetésként. [orig.: + Errors coming back from the mySQL database backend no longer + issue warnings.] + Ha szeretnéd megkapni a hiba kódját, használd a + <function>mysql_errno</function> függvényt! + Ez a függvény csak az utolsó MySQL mûvelet hibakódját adja vissza + [(not including <function>mysql_error</function> and + <function>mysql_errno</function>)], ha használni szeretnéd, ügyelj rá, + hogy még azelõtt hívd meg a függvényt, mielõtt egy másik MySQL függvényt + meghívsz. <informalexample> <programlisting role="php"> &lt;?php @@ -607,7 +544,7 @@ </informalexample> </para> <para> - See also: <function>mysql_error</function> + Lásd még a <function>mysql_error</function> függvényt </para> </refsect1> </refentry> @@ -615,15 +552,14 @@ <refentry id="function.mysql-error"> <refnamediv> <refname>mysql_error</refname> - <refpurpose>Returns the text of the error message from previous - MySQL operation</refpurpose> + <refpurpose>Az elõzõ MySQL mûvelet hibaszövegét adja</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>string <function>mysql_error</function></funcdef> - <paramdef>resource + <paramdef>int <parameter> <optional>link_identifier</optional> </parameter> @@ -631,17 +567,20 @@ </funcprototype> </funcsynopsis> <para> - Returns the error text from the last MySQL function, or - <literal>''</literal> (the empty string) if no error occurred. + Az utolsó MySQL mûvelet hibaszövegével tér vissza, vagy + <literal>''</literal> (üres karakterlánccal) ha nem volt hiba. </para> <para> - Errors coming back from the MySQL database backend no longer - issue warnings. Instead, use <function>mysql_error</function> to - retrieve the error text. Note that this function only returns the - error text from the most recently executed MySQL function (not - including <function>mysql_error</function> and - <function>mysql_errno</function>), so if you want to use it, make - sure you check the value before calling another MySQL function. + A MySQL hibái már nem jelennek meg figyelmeztetésként. [orig.: + Errors coming back from the mySQL database backend no longer + issue warnings.] + Ha szeretnéd megkapni a hiba kódját, használd a + <function>mysql_error</function> függvényt! + Ez a függvény csak az utolsó MySQL mûvelet hibakódját adja vissza + [(not including <function>mysql_error</function> and + <function>mysql_errno</function>)], ha használni szeretnéd, ügyelj rá, + hogy még azelõtt hívd meg a függvényt, mielõtt egy másik MySQL függvényt + meghívsz. <informalexample> <programlisting role="php"> &lt;?php @@ -656,52 +595,24 @@ </informalexample> </para> <para> - See also: <function>mysql_errno</function> + Lásd még a <function>mysql_errno</function> függvényt! </para> </refsect1> </refentry> - <refentry id="function.mysql-escape-string"> - <refnamediv> - <refname>mysql_escape_string</refname> - <refpurpose> - Escapes a string for use in a mysql_query. - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>mysql_escape_string</function></funcdef> - <paramdef>string <parameter>unescaped_string</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - This function will escape the <parameter>unescaped_string</parameter>, - so that it is safe to place it in a <function>mysql_query</function>. - </para> - <note> - <simpara> - <function>mysql_escape_string</function> does not escape <literal>%</literal> - and <literal>_</literal>. - </simpara> - </note> - </refsect1> - </refentry> - <refentry id="function.mysql-fetch-array"> <refnamediv> <refname>mysql_fetch_array</refname> <refpurpose> - Fetch a result row as an associative array, a numeric array, or both. + Kérés egy sorát adja vissza (tetszõleges) tömb formájában. </refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>array <function>mysql_fetch_array</function></funcdef> - <paramdef>resource <parameter>result</parameter></paramdef> + <paramdef>int <parameter>result</parameter></paramdef> <paramdef>int <parameter> <optional>result_type</optional> @@ -710,54 +621,54 @@ </funcprototype> </funcsynopsis> <para> - Returns an array that corresponds to the fetched row, or &false; - if there are no more rows.</para> + Az eredmény következõ sorával tér vissza tömb formájában, vagy hamissal, + ha már nincs több sor.</para> <para> - <function>mysql_fetch_array</function> is an extended version of - <function>mysql_fetch_row</function>. In addition to storing the - data in the numeric indices of the result array, it also stores - the data in associative indices, using the field names as keys. + A <function>mysql_fetch_array</function> függvény a + <function>mysql_fetch_row</function> függvény kiterjesztett változata. + Ráadásul az eredményt nem csak számokkal indexelt tömbbe írja, hanem + asszociatív tömbbe is, ahol a mezõ nevei a kulcsok. </para> <para> - If two or more columns of the result have the same field names, - the last column will take precedence. To access the other column(s) - of the same name, you must the numeric index of the column or - make an alias for the column. + Ha az eredmény több sorának ugyanaz a neve, akkor a késõbb szereplõ + oszlop marad meg. Ha szeretnéd az összes mezõt elérni ilyenkor is, akkor + számmal indexeld a tömböt, vagy az SQL parancsban kérj aliast az + oszlopra. <informalexample> <programlisting> -select t1.f1 as foo t2.f1 as bar from t1, t2 +select t1.f1 as ize t2.f1 as bigyo from t1, t2 </programlisting> </informalexample> </para> <para> - An important thing to note is that using - <function>mysql_fetch_array</function> is NOT significantly - slower than using <function>mysql_fetch_row</function>, while it - provides a significant added value. + Jó tudni, hogy a <function>mysql_fetch_array</function> függvény + használata NEM jelentõsen lassabb a <function>mysql_fetch_row</function> + használatánál, de a kapott eredmény feldolgozása jóval kényelmesebb. </para> <para> - The optional second argument <parameter>result_type</parameter> - in <function>mysql_fetch_array</function> is a constant and can - take the following values: MYSQL_ASSOC, MYSQL_NUM, and - MYSQL_BOTH. (This feature was added in PHP 3.0.7) + A <function>mysql_fetch_array</function> függvény elhagyható + <parameter>result_type</parameter> paramétere a következõ lehet: + MYSQL_ASSOC, MYSQL_NUM, vagy MYSQL_BOTH. + (Ez a lehetõség a PHP 3.0.7-es változatában került a nyelvbe.) </para> <para> - For further details, see also - <function>mysql_fetch_row</function> and <function>mysql_fetch_assoc</function>. + További részletekért olvasd még a + <function>mysql_fetch_row</function> és a + <function>mysql_fetch_assoc</function> függvényeket! </para> <example> - <title><function>mysql_fetch_array</function> example</title> + <title><function>Mysql_fetch_array</function></title> <programlisting role="php"> &lt;?php -mysql_connect ($host, $user, $password); -$result = mysql_db_query ("database","select user_id, fullname from table"); -while ($row = mysql_fetch_array ($result)) { - echo "user_id: ".$row["user_id"]."&lt;br>\n"; - echo "user_id: ".$row[0]."&lt;br>\n"; - echo "fullname: ".$row["fullname"]."&lt;br>\n"; - echo "fullname: ".$row[1]."&lt;br>\n"; +mysql_connect ($host, $felhasznalo, $jelszo); +$eredmeny = mysql_db_query ("adatbázis","select user_id, teljesnev from table"); +while ($sor = mysql_fetch_array ($eredmeny)) { + echo "user_id: ".$sor["user_id"]."&lt;br&gt;\n"; + echo "user_id: ".$sor[0]."&lt;br&gt;\n"; + echo "fullname: ".$sor["fullname"]."&lt;br&gt;\n"; + echo "fullname: ".$sor[1]."&lt;br&gt;\n"; } -mysql_free_result ($result); +mysql_free_result ($eredmeny); ?&gt; </programlisting> </example> @@ -768,74 +679,76 @@ <refnamediv> <refname>mysql_fetch_assoc</refname> <refpurpose> - Fetch a result row as an associative array + Az eredmény egy sorát asszociatív tömbként adja vissza. </refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>array <function>mysql_fetch_assoc</function></funcdef> - <paramdef>resource <parameter>result</parameter></paramdef> + <paramdef>int <parameter>result</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - Returns an associative array that corresponds to the fetched row, - or &false; if there are no more rows.</para> + Az eredmény következõ sorával, mint asszociatív tömbbel tér vissza, vagy + hamissal, ha nincs több sor.</para> <para> - <function>mysql_fetch_assoc</function> is equivalent to calling - <function>mysql_fetch_array</function> with MYSQL_ASSOC for the - optional second parameter. It only returns an associative array. - This is the way <function>mysql_fetch_array</function> originally - worked. If you need the numeric indices as well as the - associative, use <function>mysql_fetch_array</function>. + A <function>mysql_fetch_assoc</function> függvény hívásával ugyanazt + érjük el, mintha a <function>mysql_fetch_array</function> függvényt + hívtuk volna meg MYSQL_ASSOC második paraméterrel. Ez a függvény egy + tisztán asszociatív tömböt ad vissza. Eredetileg a + <function>mysql_fetch_array</function> függvény így mûködött. Ha a + számokkal indexelt elemekre is szükséged van, akkor használd a + <function>mysql_fetch_array</function> függvényt. </para> <para> - If two or more columns of the result have the same field names, - the last column will take precedence. To access the other column(s) - of the same name, you must use <function>mysql_fetch_array</function> and - have it return the numeric indices as well. + Ha az eredmény több sorának ugyanaz a neve, akkor a késõbb szereplõ + oszlop marad meg. Ha szeretnéd az összes mezõt elérni ilyenkor is, akkor + az SQL parancsban kérj aliast az oszlopra, vagy használd a + <function>mysql_fetch_array</function> függvényt úgy, hogy a számmal + indexelt elemeket is kéred. </para> <para> - An important thing to note is that using - <function>mysql_fetch_assoc</function> is NOT significantly - slower than using <function>mysql_fetch_row</function>, while it - provides a significant added value. + Jó tudni, hogy a <function>mysql_fetch_assoc</function> függvény + használata NEM jelentõsen lassabb a <function>mysql_fetch_row</function> + használatánál, de a kapott eredmény feldolgozása jóval kényelmesebb. </para> <para> - For further details, see also - <function>mysql_fetch_row</function> and <function>mysql_fetch_array</function>. + További részletekért lásd még a + <function>mysql_fetch_row</function> és a + <function>mysql_fetch_array</function> függvényeket. </para> <example> - <title><function>mysql_fetch_assoc</function></title> + <title><function>Mysql_fetch_assoc</function></title> <programlisting role="php"> &lt;?php -mysql_connect ($host, $user, $password); -$result = mysql_db_query ("database","select * from table"); -while ($row = mysql_fetch_assoc ($result)) { - echo $row["user_id"]; - echo $row["fullname"]; +mysql_connect ($host, $felhasznalo, $jelszo); +$eredmeny = mysql_db_query ("adatbázis","select * from table"); +while ($sor = mysql_fetch_assoc ($eredmeny)) { + echo $sor["user_id"]; + echo $sor["fullname"]; } -mysql_free_result ($result); +mysql_free_result ($eredmeny); ?&gt; </programlisting> </example> </refsect1> </refentry> - <refentry id="function.mysql-fetch-field"> + <refentry id="function.mysql-fetch-field"> <refnamediv> <refname>mysql_fetch_field</refname> <refpurpose> - Get column information from a result and return as an object + Eredményhalmaz egy oszlopáról ad információt objektum formájában </refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>object <function>mysql_fetch_field</function></funcdef> - <paramdef>resource <parameter>result</parameter></paramdef> + <paramdef>int <parameter>result</parameter></paramdef> <paramdef>int <parameter> <optional>field_offset</optional> @@ -844,117 +757,118 @@ </funcprototype> </funcsynopsis> <para> - Returns an object containing field information. + Egy mezõinformációt tartalmazó objektummal tér vissza. </para> <para> - <function>mysql_fetch_field</function> can be used in order to - obtain information about fields in a certain query result. If - the field offset isn't specified, the next field that wasn't yet - retrieved by <function>mysql_fetch_field</function> is retrieved. + A <function>mysql_fetch_field</function> függvényt arra használhatod, + hogy az eredmény egy oszlopáról információt kaphass. Ha a mezõ sorszámát + nem adod meg, akkor a következõ olyan oszlopról kapsz információt, + amelyre még nem hívtad meg a + <function>mysql_fetch_field</function> függvényt. </para> <para> - The properties of the object are: + Az objektum tulajdonságai: <itemizedlist> <listitem> <simpara> - name - column name + name - az oszlop neve </simpara> </listitem> <listitem> <simpara> - table - name of the table the column belongs to + table - a tábla neve, amelyhez az oszlop tartozik </simpara> </listitem> <listitem> <simpara> - max_length - maximum length of the column + max_length - az oszlop maximális hossza </simpara> </listitem> <listitem> <simpara> - not_null - 1 if the column cannot be &null; + not_null - értéke 1, ha az oszlop nem veheti fel a NULL értéket </simpara> </listitem> <listitem> <simpara> - primary_key - 1 if the column is a primary key + primary_key - értéke 1, ha az oszlop elsõdleges kulcs </simpara> </listitem> <listitem> <simpara> - unique_key - 1 if the column is a unique key + unique_key - értéke 1, ha az oszlop egyszerû kulcs </simpara> </listitem> <listitem> <simpara> - multiple_key - 1 if the column is a non-unique key + multiple_key - értéke 1, ha az oszlop összetett kulcs része </simpara> </listitem> <listitem> <simpara> - numeric - 1 if the column is numeric + numeric - értéke 1, ha az oszlop szám </simpara> </listitem> <listitem> <simpara> - blob - 1 if the column is a BLOB + blob - értéke 1, ha az oszlop BLOB típusú </simpara> </listitem> <listitem> <simpara> - type - the type of the column + type - az oszlop típusa </simpara> </listitem> <listitem> <simpara> - unsigned - 1 if the column is unsigned + unsigned - értéke 1, ha az oszlop nem elõjeles </simpara> </listitem> <listitem> <simpara> - zerofill - 1 if the column is zero-filled + zerofill - értéke 1, ha az oszlop nullával feltöltött </simpara> </listitem> </itemizedlist> </para> <example> - <title><function>mysql_fetch_field</function></title> + <title><function>Mysql_fetch_field</function></title> <programlisting role="php"> &lt;?php -mysql_connect ($host, $user, $password) - or die ("Could not connect"); -$result = mysql_db_query ("database", "select * from table") - or die ("Query failed"); -# get column metadata +mysql_connect ($host, $felhasznalo, $jelszo) + or die ("Nem lehet csatlakozni az adatbázishoz"); +$eredmeny = mysql_db_query ("adatbázis", "select * from table") + or die ("Hibás kérés"); +# oszlopinformáció lekérése $i = 0; -while ($i &lt; mysql_num_fields ($result)) { - echo "Information for column $i:&lt;BR>\n"; - $meta = mysql_fetch_field ($result); +while ($i &lt; mysql_num_fields ($eredmeny)) { + echo "Információ a $i. oszlopról:&lt;BR&gt;\n"; + $meta = mysql_fetch_field ($eredmeny); if (!$meta) { - echo "No information available&lt;BR>\n"; + echo "Nem tudok információt lekérni&lt;BR>gt;\n"; } - echo "&lt;PRE> -blob: $meta->blob -max_length: $meta->max_length -multiple_key: $meta->multiple_key -name: $meta->name -not_null: $meta->not_null -numeric: $meta->numeric -primary_key: $meta->primary_key -table: $meta->table -type: $meta->type -unique_key: $meta->unique_key -unsigned: $meta->unsigned -zerofill: $meta->zerofill -&lt;/PRE>"; + echo "&lt;PRE&gt; +blob: $meta-&gt;blob +max_length: $meta-&gt;max_length +multiple_key: $meta-&gt;multiple_key +name: $meta-&gt;name +not_null: $meta-&gt;not_null +numeric: $meta-&gt;numeric +primary_key: $meta-&gt;primary_key +table: $meta-&gt;table +type: $meta-&gt;type +unique_key: $meta-&gt;unique_key +unsigned: $meta-&gt;unsigned +zerofill: $meta-&gt;zerofill +&lt;/PRE&gt;"; $i++; } -mysql_free_result ($result); +mysql_free_result ($eredmeny); ?&gt; </programlisting> </example> <para> - See also <function>mysql_field_seek</function>. + Lásd még a <function>mysql_field_seek</function> függvényt! </para> </refsect1> </refentry> @@ -963,32 +877,31 @@ <refnamediv> <refname>mysql_fetch_lengths</refname> <refpurpose> - Get the length of each output in a result + Az eredmény oszlopainak hosszáról nyújt információt </refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>array <function>mysql_fetch_lengths</function></funcdef> - <paramdef>resource <parameter>result</parameter></paramdef> + <paramdef>int <parameter>result</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - Returns: An array that corresponds to the lengths of each field - in the last row fetched by <function>mysql_fetch_row</function>, - or &false; on error. + Egy tömbbel tér vissza. A tömb elemei az utolsó + <function>mysql_fetch_row</function> függvény által betöltött oszlopok + hosszait tartalmazza, vagy hiba esetén hamisat. </para> <para> - <function>mysql_fetch_lengths</function> stores the lengths of - each result column in the last row returned by + A <function>mysql_fetch_lengths</function> függvény a <function>mysql_fetch_row</function>, - <function>mysql_fetch_array</function>, and - <function>mysql_fetch_object</function> in an array, starting at - offset 0. + <function>mysql_fetch_array</function> vagy a + <function>mysql_fetch_object</function> által betöltött sor hosszait adja + vissza számmal indexelt tömb formájában. </para> <para> - See also: <function>mysql_fetch_row</function>. + Lásd még a <function>mysql_fetch_row</function> függvényt! </para> </refsect1> </refentry> @@ -996,14 +909,15 @@ <refentry id="function.mysql-fetch-object"> <refnamediv> <refname>mysql_fetch_object</refname> - <refpurpose>Fetch a result row as an object</refpurpose> + <refpurpose>Az eredmény következõ sorát objektum formájában adja + vissza</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>object <function>mysql_fetch_object</function></funcdef> - <paramdef>resource <parameter>result</parameter></paramdef> + <paramdef>int <parameter>result</parameter></paramdef> <paramdef>int <parameter> <optional>result_type</optional> @@ -1012,44 +926,44 @@ </funcprototype> </funcsynopsis> <para> - Returns an object with properties that correspond to the fetched - row, or &false; if there are no more rows. + Egy objektummal tér vissza, amelynek tulajdonságai a betöltött sor + oszlopait tartalmazzák. Ha nincs több sor, a függvény hamisat ad + eredményül. </para> <para> - <function>mysql_fetch_object</function> is similar to - <function>mysql_fetch_array</function>, with one difference - an - object is returned, instead of an array. Indirectly, that means - that you can only access the data by the field names, and not by - their offsets (numbers are illegal property names). + A <function>mysql_fetch_object</function> függvény hasonló a + <function>mysql_fetch_array</function> függvényhez, egy különbséggel: nem + tömböt, hanem objektumot ad vissza a függvény. Ez azt jelenti, hogy a + mezõket csak a nevük alapján tudod elérni, mivel a számok nem + érvényes tulajdonságnevek. </para> <para> - The optional argument <parameter>result_type</parameter> is a - constant and can take the following values: MYSQL_ASSOC, - MYSQL_NUM, and MYSQL_BOTH. + Az elhagyható <parameter>result_type</parameter> parméter egy konstans, + ami MYSQL_ASSOC, MYSQL_NUM vagy MYSQL_BOTH lehet. </para> <para> - Speed-wise, the function is identical to - <function>mysql_fetch_array</function>, and almost as quick as - <function>mysql_fetch_row</function> (the difference is - insignificant). + Sebesség szempontjából a <function>mysql_fetch_array</function> + függvénnyel azonos sebességû és majdnem olyan gyors, mint a + <function>mysql_fetch_row</function> függvény (a különbség + elhanyagolható) <example> - <title><function>mysql_fetch_object</function> example</title> + <title><function>mysql_fetch_object</function> példa</title> <programlisting role="php"> &lt;?php -mysql_connect ($host, $user, $password); -$result = mysql_db_query ("database", "select * from table"); -while ($row = mysql_fetch_object ($result)) { - echo $row->user_id; - echo $row->fullname; +mysql_connect ($host, $felhasznalo, $jelszo); +$eredmeny = mysql_db_query ("adatbázis", "select * from table"); +while ($sor = mysql_fetch_object ($eredmeny)) { + echo $sor-&gt;user_id; + echo $sor-&gt;fullname; } -mysql_free_result ($result); +mysql_free_result ($eredmeny); ?&gt; </programlisting> </example> </para> <para> - See also: <function>mysql_fetch_array</function> and - <function>mysql_fetch_row</function>. + Lásd még a <function>mysql_fetch_array</function> és a + <function>mysql_fetch_row</function> függvényt! </para> </refsect1> </refentry> @@ -1057,37 +971,37 @@ <refentry id="function.mysql-fetch-row"> <refnamediv> <refname>mysql_fetch_row</refname> - <refpurpose>Get a result row as an enumerated array</refpurpose> + <refpurpose>Az eredmény következõ sorát adja vissza számmal indexelt tömb + formájában</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>array <function>mysql_fetch_row</function></funcdef> - <paramdef>resource <parameter>result</parameter></paramdef> + <paramdef>int <parameter>result</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - Returns: An array that corresponds to the fetched row, or &false; - if there are no more rows. + Egy számmal indexelt tömbbel tér vissza, ami a betöltött sorokat + tartalmazza, vagy hamissal, ha nincs több sor. </para> <para> - <function>mysql_fetch_row</function> fetches one row of data from - the result associated with the specified result identifier. The - row is returned as an array. Each result column is stored in an - array offset, starting at offset 0. + A <function>mysql_fetch_row</function> függvény betölt egy sort a + megadott eredmény-azonosítójú eredményhalmazból. A sort (számmal + indexelt) tömb formájában adja vissza. Az oszlopok számozása 0-tól indul. </para> <para> - Subsequent call to <function>mysql_fetch_row</function> would - return the next row in the result set, or &false; if there are no - more rows. + A <function>mysql_fetch_row</function> többszöri alkamazásával végig + tudjuk járni az eredményhalmazt, mivel az mindig a következõ sort tölti + be, majd ha elfogytak a sorok, hamisat ad vissza. </para> <para> - See also: <function>mysql_fetch_array</function>, + Lásd még a <function>mysql_fetch_array</function>, <function>mysql_fetch_object</function>, <function>mysql_data_seek</function>, - <function>mysql_fetch_lengths</function>, and - <function>mysql_result</function>. + <function>mysql_fetch_lengths</function> és a + <function>mysql_result</function> függvényeket! </para> </refsect1> </refentry> @@ -1096,32 +1010,32 @@ <refnamediv> <refname>mysql_field_flags</refname> <refpurpose> - Get the flags associated with the specified field in a result + Adott eredmény adott mezejének flagjeit adja vissza. </refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>string <function>mysql_field_flags</function></funcdef> - <paramdef>resource <parameter>result</parameter></paramdef> + <paramdef>int <parameter>result</parameter></paramdef> <paramdef>int <parameter>field_offset</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>mysql_field_flags</function> returns the field flags of - the specified field. The flags are reported as a single word - per flag separated by a single space, so that you can split the - returned value using <function>explode</function>. + A <function>mysql_field_flags</function> függvény az adott mezõ flagjeit + adja vissza. A flagek egyszerû szavak, melyeket egyetlen szóköz választ + el, így a kapott értéket feldolgozhatod a <function>explode</function> + függvény segítségével. </para> - <para>The following flags are reported, if your version of MySQL - is current enough to support them: "not_null", "primary_key", + <para>A MySQL a következõ flageket támogatja (feltéve, hogy elég friss a + használt MySQL, amit használsz): "not_null", "primary_key", "unique_key", "multiple_key", "blob", "unsigned", "zerofill", "binary", "enum", "auto_increment", "timestamp". </para> <para> - For downward compatibility <function>mysql_fieldflags</function> - can also be used. + Kompatíbilitási okokból a <function>mysql_fieldflags</function> függvény + is használható. </para> </refsect1> </refentry> @@ -1130,43 +1044,42 @@ <refnamediv> <refname>mysql_field_name</refname> <refpurpose> - Get the name of the specified field in a result + Adott mezõ nevét adja vissza </refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>string <function>mysql_field_name</function></funcdef> - <paramdef>resource <parameter>result</parameter></paramdef> + <paramdef>int <parameter>result</parameter></paramdef> <paramdef>int <parameter>field_index</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>mysql_field_name</function> returns the name of the - specified field index. <parameter>result</parameter> must be a - valid result identifier and <parameter>field_index</parameter> is - the numerical offset of the field. + A <function>mysql_field_name</function> függvény az eredményben szereplõ + megadott indexû mezõ nevét adja vissza. A <parameter>result</parameter> + paraméternek érvényes eredményazonosítónak kell lennie, + a <parameter>field_index</parameter> paraméter pedig a mezõ indexe. </para> <note> <para> - <parameter>field_index</parameter> starts at 0. + A <parameter>field_index</parameter> paraméter számozása 0-tól kezdõdik. </para> <para> - e.g. The index of the third field would actually be 2, the index - of the fourth field would be 3 and so on. + Például a harmadik mezõ indexe 2, a negyedik mezõé pedig 3. </para> </note> <para> <example> - <title><function>mysql_field_name</function> example</title> + <title><function>mysql_field_name</function> példa</title> <programlisting role="php"> -// The users table consists of three fields: +// A felhasznalok tábla három mezõbõl áll: // user_id -// username -// password. +// felhasznalonev +// jelszo. -$res = mysql_db_query("users", "select * from users", $link); +$res = mysql_db_query("felhasznalok", "select * from felhasznalok", $link); echo mysql_field_name($res, 0) . "\n"; echo mysql_field_name($res, 2); @@ -1174,17 +1087,17 @@ </example> </para> <para> - The above example would produce the following output: + A fenti példa ay alábbi kimenetet eredményezi: <informalexample> <programlisting> user_id -password +jelszo </programlisting> </informalexample> </para> <para> - For downwards compatibility <function>mysql_fieldname</function> - can also be used. + Kompatíbilitási okokból a <function>mysql_fieldname</function> + függvény is használható. </para> </refsect1> </refentry> @@ -1193,25 +1106,25 @@ <refnamediv> <refname>mysql_field_len</refname> <refpurpose> - Returns the length of the specified field + A kérdezett mezõ hosszát adja vissza </refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>int <function>mysql_field_len</function></funcdef> - <paramdef>resource <parameter>result</parameter></paramdef> + <paramdef>int <parameter>result</parameter></paramdef> <paramdef>int <parameter>field_offset</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>mysql_field_len</function> returns the length of the - specified field. + A <function>mysql_field_len</function> függvény a kérdezett mezõ + hosszával tér vissza. </para> <para> - For downward compatibility <function>mysql_fieldlen</function> - can also be used. + Kompatíbilitási okokból a <function>mysql_fieldlen</function> + függvény is használható. </para> </refsect1> </refentry> @@ -1220,26 +1133,27 @@ <refnamediv> <refname>mysql_field_seek</refname> <refpurpose> - Set result pointer to a specified field offset + Az eredménymutatót a kívánt pozícióba mozgatja </refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>int <function>mysql_field_seek</function></funcdef> - <paramdef>resource <parameter>result</parameter></paramdef> + <paramdef>int <parameter>result</parameter></paramdef> <paramdef>int <parameter>field_offset</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - Seeks to the specified field offset. If the next call to - <function>mysql_fetch_field</function> doesn't include a field - offset, the field offset specified in - <function>mysql_field_seek</function> will be returned. + A megadott helyre mozgatja az eredmény-mutatót. Ha a következõ + <function>mysql_fetch_field</function> függvényhívás nem tartalmaz mezõ + pozíciót, akkor a + <function>mysql_field_seek</function> függvény által visszaadott + mezõpozíciót fogja visszaadni. </para> <para> - See also: <function>mysql_fetch_field</function>. + Lásd még a <function>mysql_fetch_field</function> függvényt! </para> </refsect1> </refentry> @@ -1248,25 +1162,25 @@ <refnamediv> <refname>mysql_field_table</refname> <refpurpose> - Get name of the table the specified field is in + Visszaadja annak a táblának a nevét, melyben a megadott mezõ található </refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>string <function>mysql_field_table</function></funcdef> - <paramdef>resource <parameter>result</parameter></paramdef> + <paramdef>int <parameter>result</parameter></paramdef> <paramdef>int <parameter>field_offset</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - Returns the name of the table that the specifed field is - in. + A függvény annak a táblának a nevével tér vissza, melyben a megadott mezõ + szerepel. </para> <para> - For downward compatibility <function>mysql_fieldtable</function> - can also be used. + Kompatíbilitási okokból a <function>mysql_fieldtable</function> + függvény is használható. </para> </refsect1> </refentry> @@ -1275,56 +1189,56 @@ <refnamediv> <refname>mysql_field_type</refname> <refpurpose> - Get the type of the specified field in a result + Az eredmény adott mezejének típusát adja vissza </refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>string <function>mysql_field_type</function></funcdef> - <paramdef>iresource <parameter>result</parameter></paramdef> + <paramdef>int <parameter>result</parameter></paramdef> <paramdef>int <parameter>field_offset</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>mysql_field_type</function> is similar to the - <function>mysql_field_name</function> function. The arguments are - identical, but the field type is returned instead. The field type - will be one of "int", "real", "string", "blob", and others as - detailed in the <ulink url="&url.mysql.docs;">MySQL - documentation</ulink>. + A <function>mysql_field_type</function> függvény hasonló a + <function>mysql_field_name</function> függvényhez. A paraméterek + megegyeznek, de a függvény a mezõ típusával tér vissza. A mezõtípus az + "int", "real", "string", "blob" vagy hasonló, a + <ulink url="&url.mysql.docs;">MySQL dokumentációban</ulink> található + típusok közül való. <example> - <title>MySQL field types</title> + <title>mysql mezõtípusok</title> <programlisting role="php"> &lt;?php mysql_connect ("localhost:3306"); mysql_select_db ("wisconsin"); -$result = mysql_query ("SELECT * FROM onek"); -$fields = mysql_num_fields ($result); -$rows = mysql_num_rows ($result); +$eredmeny = mysql_query ("SELECT * FROM onek"); +$mezo = mysql_num_fields ($eredmeny); +$sor = mysql_num_rows ($eredmeny); $i = 0; -$table = mysql_field_table ($result, $i); -echo "Your '".$table."' table has ".$fields." fields and ".$rows." records &lt;BR>"; -echo "The table has the following fields &lt;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."&lt;BR>"; +$table = mysql_field_table ($eredmeny, $i); +echo "A '$table' nevû táblának $mezo mezõje és $sor sora van &lt;BR&gt;"; +echo "A táblának az alábbi mezõi vannak&lt;BR&gt;"; +while ($i &lt; $mezo) { + $tipus = mysql_field_type ($eredmeny, $i); + $nev = mysql_field_name ($eredmeny, $i); + $hossz = mysql_field_hossz ($eredmeny, $i); + $flags = mysql_field_flags ($eredmeny, $i); + echo "$tipus $nev $hossz $flags."&lt;BR>"; $i++; } mysql_close(); -?&gt; +?> </programlisting> </example> </para> <para> - For downward compatibility <function>mysql_fieldtype</function> - can also be used. + Kompatíbilitási okokból a <function>mysql_fieldtype</function> + függvény is használható. </para> </refsect1> </refentry> @@ -1332,31 +1246,29 @@ <refentry id="function.mysql-free-result"> <refnamediv> <refname>mysql_free_result</refname> - <refpurpose>Free result memory</refpurpose> + <refpurpose>Felszabadítja az eredmény által lefoglalt memóriát</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>int <function>mysql_free_result</function></funcdef> - <paramdef>resource <parameter>result</parameter></paramdef> + <paramdef>int <parameter>result</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>mysql_free_result</function> will free all memory - associated with the result identifier <parameter>result</parameter>. + A <function>mysql_free_result</function> függvény az összes + <parameter>result</parameter> eredményazonosító által használt memóriát + felszabadítja. </para> <para> - <function>mysql_free_result</function> only needs to be called if - you are concerned about how much memory is being used for queries - that return large result sets. All associated result memory is - automatically freed at the end of the script's execution. - <!-- TODO and as of PHP4 before, see freeing resources --> + A <function>mysql_free_result</function> függvényt csak akkor kell + meghívnod, ha nagyon aggódsz a használt memória mennyisége miatt. A + memória a php program végén úgyis felszabadul. </para> - <!-- returns?? --> <para> - For downward compatibility <function>mysql_freeresult</function> - can also be used. + Kompatíbilitási okokból a <function>mysql_freeresult</function> + függvény is használható. </para> </refsect1> </refentry> @@ -1365,15 +1277,16 @@ <refnamediv> <refname>mysql_insert_id</refname> <refpurpose> + Visszaadja az elõzõ INSERT mûvelet által elõállított id-t adja vissza. Get the id generated from the previous INSERT operation </refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>int <function>mysql_insert_id</function></funcdef> - <paramdef>resource + <paramdef>int <parameter> <optional>link_identifier</optional> </parameter> @@ -1381,36 +1294,35 @@ </funcprototype> </funcsynopsis> <para> - <function>mysql_insert_id</function> returns the ID generated for - an AUTO_INCREMENT column by the previous INSERT query using the - given <parameter>link_identifier</parameter>. If - <parameter>link_identifier</parameter> isn't specified, the last - opened link is assumed. + A <function>mysql_insert_id</function> függvény az elõzõ INSERT + mûveletben szereplõ AUTO_INCREMENT tulajdonságú mezõ értékét adja vissza. + Ha megadjuk <parameter>link_identifier</parameter>-t az adott + linkkel rendelekezõ, ha nem adunk meg paramétert, az utolsó megnyitott + linkhez tartozó eredményt szolgáltatja. </para> <para> - <function>mysql_insert_id</function> returns 0 if the previous - query does not generate an AUTO_INCREMENT value. If you need to - save the value for later, be sure to call mysql_insert_id() - immediately after the query that generates the value. + A <function>mysql_insert_id</function> függvény 0-val tér vissza, ha az + elõzõ kérésben nem jött létre AUTO_INCREMENT érték. Ha szükséged van + késõbb az értékre, hívd meg a <function>mysql_insert_id</function> <!-- + nem volt function tag --> + függvényt rögtön az értéket generáló lekérdezés után! </para> <note> <para> - The value of the MySQL SQL function - <literal>LAST_INSERT_ID()</literal> always contains the most - recently generated AUTO_INCREMENT value, and is not reset - between queries. + A <literal>LAST_INSERT_ID()</literal> függvény értéke mindig az utoljára + elõállított AUTO_INCREMENT értéket tartalmazza, nem törlõdik az értéke + lekérdezések között. </para> </note> <warning> <para> - <function>mysql_insert_id</function> converts the return type of - the native MySQL C API function - <literal>mysql_insert_id()</literal> to a type of - <literal>long</literal>. If your AUTO_INCREMENT column has - a column type of BIGINT, the value returned by - <function>mysql_insert_id</function> will be incorrect. - Instead, use the internal MySQL SQL function - <literal>LAST_INSERT_ID()</literal>. + A <function>mysql_insert_id</function> függvény a MySQL C API függvény + <literal>mysql_insert_id()</literal> visszatérési értékét + <literal>long</literal>-gá konvertálja. Ha az AUTO_INCREMENT mezõd + mondjuk BIGINT típusú, akkor a + <function>mysql_insert_id</function> függvény rossz eredményt adhat + vissza. Ezért inkább a belsõ + <literal>LAST_INSERT_ID()</literal> MySQL függvényt használd! </para> </warning> </refsect1> @@ -1420,15 +1332,15 @@ <refnamediv> <refname>mysql_list_dbs</refname> <refpurpose> - List databases available on a MySQL server + Kilistázza a MySQL szerveren elérhetõ adatbázisokat </refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> - <funcdef>resource <function>mysql_list_dbs</function></funcdef> - <paramdef>resource + <funcdef>int <function>mysql_list_dbs</function></funcdef> + <paramdef>int <parameter> <optional>link_identifier</optional> </parameter> @@ -1436,62 +1348,62 @@ </funcprototype> </funcsynopsis> <para> - <function>mysql_list_dbs</function> will return a result pointer - containing the databases available from the current mysql - daemon. Use the <function>mysql_tablename</function> function to - traverse this result pointer. + A <function>mysql_list_dbs</function> függvény egy eredménymutatót ad + vissza, ami a mysql démontól elérhetõ adatbázisokat tartalmazza. + Használd a <function>mysql_tablename</function> függvényt, hogy az összes + táblát elérd! <!--vagy valami ilyesmi... --> </para> <para> <example> - <title><function>mysql_list_dbs</function> example</title> + <title><function>mysql_list_dbs</function> példa</title> <programlisting role="php"> -$link = mysql_connect('localhost', 'myname', 'secret'); +$link = mysql_connect('localhost', 'nevem', 'titok'); $db_list = mysql_list_dbs($link); -while ($row = mysql_fetch_object($db_list)) { - echo $row->Database . "\n"; +while ($sor = mysql_fetch_object($db_list)) { + echo $sor->Database . "\n"; } </programlisting> </example> </para> <para> - The above example would produce the following output: + A fenti példa az alábbi kimenetet eredményezi. <informalexample> <programlisting> -database1 -database2 -database3 +adatbázis1 +adatbázis2 +adatbázis3 ... </programlisting> </informalexample> </para> <note> <para> - The above code would just as easily work with - <function>mysql_fetch_row</function> or other similar functions. + A fenti program egyszerûen bõvíthetõ a + <function>mysql_fetch_row</function> függvénnyel vagy más hasonló + függvénnyel. </para> </note> <para> - For downward compatibility <function>mysql_listdbs</function> can - also be used. + Kompatíbilitási okokból a <function>mysql_listdbs</function> függvény + is használható. </para> - <para>See also <function>mysql_db_name</function></para> </refsect1> </refentry> <refentry id="function.mysql-list-fields"> <refnamediv> <refname>mysql_list_fields</refname> - <refpurpose>List MySQL result fields</refpurpose> + <refpurpose>Kilistázza a MySQL eredmény mezõit</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> - <funcdef>resource <function>mysql_list_fields</function></funcdef> + <funcdef>int <function>mysql_list_fields</function></funcdef> <paramdef>string <parameter>database_name</parameter></paramdef> <paramdef>string <parameter>table_name</parameter></paramdef> - <paramdef>resource + <paramdef>int <parameter> <optional>link_identifier</optional> </parameter> @@ -1499,72 +1411,67 @@ </funcprototype> </funcsynopsis> <para> - <function>mysql_list_fields</function> retrieves information - about the given tablename. Arguments are the database name and - the table name. A result pointer is returned which can be used - with <function>mysql_field_flags</function>, + A <function>mysql_list_fields</function> függvény az adott tábláról + szolgáltat információt. A paraméterek az adatbázis és a tábla neve. A + függvény egy eredmény-azonosító tér vissza, amit a + <function>mysql_field_flags</function>, <function>mysql_field_len</function>, - <function>mysql_field_name</function>, and - <function>mysql_field_type</function>. + <function>mysql_field_name</function>, és a + <function>mysql_field_type</function> függvényekkel hámozhatsz meg. </para> - <!-- - this is very outdated, and now incorrect <para> - A result identifier is a positive integer. The function returns - -1 if a error occurs. A string describing the error will be - placed in <literal>$phperrmsg</literal>, and unless the function - was called as <literal>@mysql()</literal> then this error string - will also be printed out. - </para> --> + Az eredmény-azonosító egy pozitív egész szám. A függvény hiba esetén + -1-gyel tér vissza. A hiba szöveges leírása a + <literal>$phperrmsg</literal> változóban található, és ha nem + <literal>@mysql()</literal> &lt;- így hívtad meg a függvényt, akkor a + hiba kiírásra kerül [már ha nem pl. egy Javascript kód belsejében, vagy + egy keretrendszer tetején akarná kiírni szegény PHP...]. + </para> <para> <example> - <title><function>mysql_list_fields</function> example</title> + <title><function>mysql_list_fields</function> példa</title> <programlisting role="php"> -$link = mysql_connect('localhost', 'myname', 'secret'); +$link = mysql_connect('localhost', 'nevem', 'titok'); -$fields = mysql_list_fields("database1", "table1", $link); -$columns = mysql_num_fields($fields); +$mezo = mysql_list_fields("adatbázis1", "tabla1", $link); +$oszlop = mysql_num_fields($mezo); -for ($i = 0; $i &lt; $columns; $i++) { - echo mysql_field_name($fields, $i) . "\n";; +for ($i = 0; $i &lt; $oszlop; $i++) { + echo mysql_field_name($mezo, $i) . "\n";; } </programlisting> </example> </para> <para> - The above example would produce the following output: + A fenti példa az alábbi kimenetet eredményezi: <informalexample> <programlisting> -field1 -field2 -field3 +mezo1 +mezo2 +mezo3 ... </programlisting> </informalexample> </para> <para> - For downward compatibility <function>mysql_listfields</function> - can also be used. + Kompatíbilitási okokból a <function>mysql_listfields</function> + függvény is használható. </para> - <!-- TODO: this is equiv. with 'select * from $table where &false;,' - which implies you can better use the field-research functions - on a real query, that saves you one mysql-query. - --> </refsect1> </refentry> <refentry id="function.mysql-list-tables"> <refnamediv> <refname>mysql_list_tables</refname> - <refpurpose>List tables in a MySQL database</refpurpose> + <refpurpose>Adott adatbázisbeli táblaneveket listázza</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> - <funcdef>resource <function>mysql_list_tables</function></funcdef> + <funcdef>int <function>mysql_list_tables</function></funcdef> <paramdef>string <parameter>database</parameter></paramdef> - <paramdef>resource + <paramdef>int <parameter> <optional>link_identifier</optional> </parameter> @@ -1572,15 +1479,15 @@ </funcprototype> </funcsynopsis> <para> - <function>mysql_list_tables</function> takes a database name and - returns a result pointer much like the - <function>mysql_db_query</function> function. The - <function>mysql_tablename</function> function should be used to - extract the actual table names from the result pointer. + A <function>mysql_list_tables</function> függvény veszi az + adatbázisnevet, és egy eredmény-mutatót ad vissza, a + <function>mysql_db_query</function> függvényhez hasonlóan. A + <function>mysql_tablename</function> függvény használható arra, hogy az + eredmény-mutatóból a tényleges táblaneveket megállapítsd. </para> <para> - For downward compatibility <function>mysql_listtables</function> - can also be used. + Kompatíbilitási okokból a <function>mysql_listtables</function> + függvény is használható. </para> </refsect1> </refentry> @@ -1588,29 +1495,29 @@ <refentry id="function.mysql-num-fields"> <refnamediv> <refname>mysql_num_fields</refname> - <refpurpose>Get number of fields in result</refpurpose> + <refpurpose>Az eredményben szereplõ mezõk számát adja</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>int <function>mysql_num_fields</function></funcdef> - <paramdef>resource <parameter>result</parameter></paramdef> + <paramdef>int <parameter>result</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>mysql_num_fields</function> returns the number of - fields in a result set. + A <function>mysql_num_fields</function> függvény az eredményhalmazban + levõ mezõk számát adja vissza. </para> <para> - See also: + Lásd még a <function>mysql_db_query</function>, <function>mysql_query</function>, - <function>mysql_fetch_field</function>, - <function>mysql_num_rows</function>.</para> + <function>mysql_fetch_field</function> és a + <function>mysql_num_rows</function> függvényeket!</para> <para> - For downward compatibility <function>mysql_numfields</function> - can also be used. + Kompatíbilitási okokból a <function>mysql_numfields</function> + függvény is használható. </para> </refsect1> </refentry> @@ -1618,47 +1525,47 @@ <refentry id="function.mysql-num-rows"> <refnamediv> <refname>mysql_num_rows</refname> - <refpurpose>Get number of rows in result</refpurpose> + <refpurpose>Az eredményben szereplõ sorok számát adja vissza.</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>int <function>mysql_num_rows</function></funcdef> - <paramdef>resource <parameter>result</parameter></paramdef> + <paramdef>int <parameter>result</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>mysql_num_rows</function> returns the number of rows in - a result set. This command is only valid for SELECT statements. - To retrieve the number of rows returned from a INSERT, UPDATE or - DELETE query, use <function>mysql_affected_rows</function>. + A <function>mysql_num_rows</function> függvény az eredményhalmazban + szereplõ sorok számát adja vissza. A függvény csak SELECT kérésre + használható. Ha egy INSERT, UPDATE vagy DELETE kérésben érintett sorok + számát szeretnéd megtudni, használd a + DELETE, use <function>mysql_affected_rows</function> függvényt! <example> - <title><function>mysql_num_rows</function> example</title> + <title> + <function> + mysql_num_rows példa Szerzõ: crubel@trilizio.org + </function> + </title> <programlisting role="php"> &lt;?php - -$link = mysql_connect("localhost", "username", "password"); -mysql_select_db("database", $link); - -$result = mysql_query("SELECT * FROM table1", $link); -$num_rows = mysql_num_rows($result); - -echo "$num_rows Rows\n"; - -?&gt; +$conn = mysql_connect("hostcim", "juzer", "jelszo"); +mysql_select_db("adatbázis",$conn); // kell, ha több adatbázis van +$Eredmenytagokszama = mysql_query("SELECT * FROM Szamla",$conn); +$Tagokszama = mysql_num_rows($Eredmenytagokszama); +echo "$Tagokszama tag van"; +?> </programlisting> </example> </para> <para> - See also: - <function>mysql_affected_rows</function>, - <function>mysql_connect</function>, - <function>mysql_select_db</function> and - <function>mysql_query</function>. + Lásd még a + <function>mysql_db_query</function>, + <function>mysql_query</function> és a + <function>mysql_fetch_row</function> függvényeket! </para> <para> - For downward compatibility <function>mysql_numrows</function> can + Kompatíbilitási okokból a <function>mysql_numrows</function> can also be used. </para> </refsect1> @@ -1668,14 +1575,14 @@ <refnamediv> <refname>mysql_pconnect</refname> <refpurpose> - Open a persistent connection to a MySQL Server + Perzisztens kapcsolatot nyit meg a MySQL szerverhez </refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> - <funcdef>resource <function>mysql_pconnect</function></funcdef> + <funcdef>int <function>mysql_pconnect</function></funcdef> <paramdef>string <parameter> <optional>hostname @@ -1693,51 +1600,52 @@ </funcprototype> </funcsynopsis> <para> - Returns: A positive MySQL persistent link identifier on success, - or &false; on error. + Visszatérési értéke: Egy pozitív MySQL perzisztens kapcsolatazonosító + siker esetén, vagy false, ha hiba történt. </para> <para> - <function>mysql_pconnect</function> establishes a connection - to a MySQL server. The following defaults are assumed for - missing optional parameters: <parameter>host:port</parameter> = - 'localhost:3306', <parameter>username</parameter> = name of the - user that owns the server process and - <parameter>password</parameter> = empty password. - </para> - <para> - The hostname string can also include a port - number. eg. &quot;hostname:port&quot; or a path to a socket - eg. &quot;:/path/to/socket&quot; for the localhost. + A <function>mysql_pconnect</function> függvény létrehoz egy kapcsolatot a + MySQL szerverhez. Az elhagyott paraméterek az alábbi értékeket veszik + fel: + <parameter>host:port</parameter> = + 'localhost:3306', <parameter>username</parameter> = annak a + felhasználónak a neve, akié a szerver folyamat és végül: + <parameter>password</parameter> = üres jelszó. + </para> + <para> + A <parameter>hostname</parameter> karakterlánc a port számát is + tartalmazhatja; pl.: &quot;hostname:port&quot; vagy a socket teljes + elérési útvonalát pl.: &quot;:/path/to/socket&quot;. Ez persze csak a + helyi gépen mûködik. <note> <para> - Support for &quot;:port&quot; was added in 3.0B4. + A &quot;:port&quot; használata a 3.0B4-es verzió óta lehetséges. </para> <para> - Support for the &quot;:/path/to/socket&quot; was added in - 3.0.10. + A &quot;:/path/to/socket&quot; forma használata a 3.0.10-es verzió óta + támogatott. </para> </note> </para> - - <!-- TODO move the story to features.persistent, and refer to that --> <para> - <function>mysql_pconnect</function> acts very much like - <function>mysql_connect</function> with two major differences. + A <function>mysql_pconnect</function> függvény a + <function>mysql_connect</function> függvényhez hasonlóan mûködik, csupán + két nagyobb különbség van: </para> <para> - First, when connecting, the function would first try to find a - (persistent) link that's already open with the same host, - username and password. If one is found, an identifier for it - will be returned instead of opening a new connection. + Elõször is, a kapcsolat felvételekor a függvény elõször megpróbál egy + (perzisztens) kapcsolatot találni, amely már nyitva van arra a hostra + ugyanazzal a név/jelszó párossal. Ha talál ilyet, akkor ennek a kapocsnak + az azonosítóját adja vissza és nem nyit újat. </para> <para> - Second, the connection to the SQL server will not be closed when - the execution of the script ends. Instead, the link will remain - open for future use (<function>mysql_close</function> will not - close links established by <function>mysql_pconnect</function>). + Másodszor pedig a kapcsolat az SQL szerverhez nem kerül bezárásra, amikor + a php program véget ér, hanem megmarad késõbbi felhasználásra. + (A <function>mysql_close</function> függvény nem fogja neked lezárni a + <function>mysql_pconnect</function> függvénnyel megnyitott kapcsolatokat). </para> <para> - This type of links is therefore called 'persistent'. + Az ilyen típusú kapcsolatot ezért hívják 'perzisztensnek'. </para> </refsect1> </refentry> @@ -1745,143 +1653,99 @@ <refentry id="function.mysql-query"> <refnamediv> <refname>mysql_query</refname> - <refpurpose>Send a MySQL query</refpurpose> + <refpurpose>MySQL kérést küld a szervernek</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> - <funcdef>resource <function>mysql_query</function></funcdef> + <funcdef>int <function>mysql_query</function></funcdef> <paramdef>string <parameter>query</parameter></paramdef> - <paramdef>resource + <paramdef>int <parameter><optional>link_identifier</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> <para> - <function>mysql_query</function> sends a query to the currently - active database on the server that's associated with the - specified link identifier. If - <parameter>link_identifier</parameter> isn't specified, the last - opened link is assumed. If no link is open, the function tries - to establish a link as if <function>mysql_connect</function> was - called with no arguments, and use it. + A <function>mysql_query</function> függvény kérést küld a megadott + kapcsolat-azonosítójú szerver aktív adatbázisához. + Ha nem adsz meg <parameter>link_identifier</parameter>-t, akkor a + legutóbb megnyitott kapcsolatot használja a függvény. Ha nincs nyitva + ilyen kapcsolat, akkor a függvény megpróbál nyitni egyet, mintha a + <function>mysql_connect</function> függvényt hívtuk volna paraméterek + nélkül. </para> <note> <para> - The query string should not end with a semicolon. + A kérésnek nem szabad pontosvesszõre végzõdnie. </para> </note> <para> - <function>mysql_query</function> returns &true; (non-zero) or &false; - to indicate whether or not the query succeeded. A return value - of &true; means that the query was legal and could be executed by - the server. It does not indicate anything about the number of - rows affected or returned. It is perfectly possible for a query - to succeed but affect no rows or return no rows. + A <function>mysql_query</function> függvény TRUE-val (nemnulla) vagy + FALSE-szal tér vissza, attól függõen, hogy a kérés teljesítése sikeres + volt-e. A TRUE visszatérési érték azt jelenti, hogy a kérés + szintaktikailag helyes volt, és lefuttatta a szerver. Az érintett sorok + számáról azonban nem mond semmit. Elõfordulhat ugyanis, hogy a kérés + sikeresen lefutott, de nem érintett egyetlen sort sem, vagy az + eredményben egyetlen sor sincs. </para> <para> - The following query is syntactically invalid, so - <function>mysql_query</function> fails and returns &false;: + A következõ kérés szintaktikailag rossz, igy a + <function>mysql_query</function> függvény meghiúsul és FALSE eredményt + ad: <example> <title><function>mysql_query</function></title> <programlisting role="php"> &lt;?php -$result = mysql_query ("SELECT * WHERE 1=1") - or die ("Invalid query"); -?&gt; +$eredmeny = mysql_query ("SELECT * WHERE 1=1") + or die ("Érvénytelen lekérdezés"); +?> </programlisting> </example> </para> <para> - The following query is semantically invalid if - <literal>my_col</literal> is not a column in the table - <literal>my_tbl</literal>, so <function>mysql_query</function> - fails and returns &false;: + Az alábbi kérés szemantikailag helytelen, ha nincs + <literal>my_col</literal> nevû oszlop a + <literal>my_tbl</literal> nevû táblában, így a + <function>mysql_query</function> meghiúsul és FALSE értékkel tér vissza. <example> <title><function>mysql_query</function></title> <programlisting role="php"> &lt;?php -$result = mysql_query ("SELECT my_col FROM my_tbl") - or die ("Invalid query"); -?&gt; +$eredmeny = mysql_query ("SELECT my_col FROM my_tbl") + or die ("Érvénytelen kérés"); +?> </programlisting> </example> </para> <para> - <function>mysql_query</function> will also fail and return &false; - if you don't have permission to access the table(s) referenced by - the query. + A <function>mysql_query</function> függvény akkor is meghiúsul és FALSE + értékkel tér vissza, ha nincs megfelelõ engedélyed a kérés által + hivatkozott táblá(k)hoz. </para> <para> - Assuming the query succeeds, you can call - <function>mysql_num_rows</function> to find out how many rows - were returned for a SELECT statment or - <function>mysql_affected_rows</function> to find out how many - rows were affected by a DELETE, INSERT, REPLACE, or UPDATE - statement. + Feltéve, hogy a kérés sikeres, meghívhatod a + <function>mysql_num_rows</function> függvényt, hogy kiderítsd, hány sort + kaptál vissza a SELECT kérésedre, vagy a + <function>mysql_affected_rows</function> függvényt, hogy megtudd hány + sort érintett a DELETE, NSERT, REPLACE vagy UPDATE kérésed. </para> <para> - For SELECT statements, <function>mysql_query</function> returns a - new result identifier that you can pass to - <function>mysql_result</function>. When you are done with the - result set, you can free the resources associated with it by - calling <function>mysql_free_result</function>. Although, the - memory will automatically be freed at the end of the script's - execution. + SELECT kérés esetében a <function>mysql_query</function> függvény + egy új eredmény-azonosítót ad vissza, amit késõbb a + <function>mysql_result</function> függvénnyel használhatsz. + Ha az eredményre már nincs szükség és memóriafóbiád van, akkor a + <function>mysql_free_result</function> függvénnyel a foglalt memóriát + felszabadíthatod, normál esetben megvárod a program végét és a memória + felszabadul. </para> <para> - See also: <function>mysql_affected_rows</function>, + Lásd még a <function>mysql_affected_rows</function>, <function>mysql_db_query</function>, - <function>mysql_unbuffered_query</function>, <function>mysql_free_result</function>, <function>mysql_result</function>, - <function>mysql_select_db</function>, and - <function>mysql_connect</function>. - </para> - </refsect1> - </refentry> - - <refentry id="function.mysql-unbuffered-query"> - <refnamediv> - <refname>mysql_unbuffered_query</refname> - <refpurpose>Send an SQL query to MySQL, without fetching and buffering the result rows</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>resource <function>mysql_unbuffered_query</function></funcdef> - <paramdef>string <parameter>query</parameter></paramdef> - <paramdef>resource - <parameter><optional>link_identifier</optional></parameter> - </paramdef> - <paramdef>int - <parameter><optional>result_mode</optional></parameter> - </paramdef> - </funcprototype> - </funcsynopsis> - <para> - <function>mysql_unbuffered_query</function> sends a SQL query to MySQL, - without fetching and buffering the result rows automatically, as - <function>mysql_query</function> does. - On the one hand, this saves a considerable amount of memory with SQL - queries that produce large result sets. On the other hand, you can start - working on the result set immediately after the first row has been - retrieved: you don't have to wait until the complete SQL query has been - performed. - </para> - <note> - <para> - The benefits of <function>mysql_unbuffered_query</function> come at a - cost: You cannot use <function>mysql_num_rows</function> on a result set - returned from <function>mysql_unbuffered_query</function>. You also have - to fetch all result rows from an unbuffered SQL query, before you can - send a new SQL query to MySQL. - </para> - </note> - <para> - See also: <function>mysql_query</function>. + <function>mysql_select_db</function> és a + <function>mysql_connect</function> függvényeket! </para> </refsect1> </refentry> @@ -1889,14 +1753,14 @@ <refentry id="function.mysql-result"> <refnamediv> <refname>mysql_result</refname> - <refpurpose>Get result data</refpurpose> + <refpurpose>Eredmény egy sorának lekérdezése</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>mixed <function>mysql_result</function></funcdef> - <paramdef>resource <parameter>result</parameter></paramdef> + <paramdef>int <parameter>result</parameter></paramdef> <paramdef>int <parameter>row</parameter></paramdef> <paramdef>mixed <parameter> @@ -1906,30 +1770,31 @@ </funcprototype> </funcsynopsis> <para> - <function>mysql_result</function> returns the contents of one - cell from a MySQL result set. The field argument can be the - field's offset, or the field's name, or the field's table dot - field's name (tabledname.fieldname). If the column name has been - aliased ('select foo as bar from...'), use the alias instead of - the column name. + A <function>mysql_result</function> függvény egy MySQL eredményhalmaz egy + elemét adja vissza. A mezõ paraméter a mezõ sorszáma vagy neve lehet vagy + táblanév pont mezõnév (táblanév.mezõnév). Ha az oszlop más néven lett + lekérve, mint ami az oszlop eredeti neve volt + ('select izé as bigyó from...'), akkor használd azt a bizonyos 'más + nevet'! </para> <para> - When working on large result sets, you should consider using one - of the functions that fetch an entire row (specified below). As - these functions return the contents of multiple cells in one - function call, they're MUCH quicker than - <function>mysql_result</function>. Also, note that specifying a - numeric offset for the field argument is much quicker than - specifying a fieldname or tablename.fieldname argument. + Amikor nagy eredményhalmazokkal dolgozol, akkor mérlegelned kell az olyan + függvyének használatát, amelyek az egész eredménysort betöltik. Mivel + ezek több cella tartalmát olvassák be egy függvényhívással, így ezek + SOKKAL gyorsabbak, mint a + <function>mysql_result</function> függvény hívogatása. Említést érdemel + még, hogy a numerikus index használata jóval gyorsabb, mint a mezõnév + vagy a táblanév.mezõnév forma használata. </para> <para> - Calls to <function>mysql_result</function> should not be mixed - with calls to other functions that deal with the result set. + A <function>mysql_result</function> függvényhívásokat más, ugyanazon + eredményhalmazzal foglalkozó függvényhívásokkal nem illik (gyk. TILOS) + együtt használni! </para> <para> - Recommended high-performance alternatives: + Ajánlott az alábbi, gyors [és programozóbarát] függvények használata: <function>mysql_fetch_row</function>, - <function>mysql_fetch_array</function>, and + <function>mysql_fetch_array</function> és <function>mysql_fetch_object</function>. </para> </refsect1> @@ -1938,15 +1803,15 @@ <refentry id="function.mysql-select-db"> <refnamediv> <refname>mysql_select_db</refname> - <refpurpose>Select a MySQL database</refpurpose> + <refpurpose>Kiválaszt egy MySQL adatbázist</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> - <funcdef>bool <function>mysql_select_db</function></funcdef> + <funcdef>int <function>mysql_select_db</function></funcdef> <paramdef>string <parameter>database_name</parameter></paramdef> - <paramdef>resource + <paramdef>int <parameter> <optional>link_identifier</optional> </parameter> @@ -1954,28 +1819,28 @@ </funcprototype> </funcsynopsis> <para> - Returns: &true; on success, &false; on error. + Visszatérési érték: true, ha sikeres; false ha hiba történt. </para> <para> - <function>mysql_select_db</function> sets the current active - database on the server that's associated with the specified link - identifier. If no link identifier is specified, the last opened - link is assumed. If no link is open, the function will try to - establish a link as if <function>mysql_connect</function> was - called, and use it. + A <function>mysql_select_db</function> függvény az adott + kapcsolat-azonosítójú szerverkapcsolat adatbázisát módosítja. Ha nincs + kapcsolat-azonosító megadva, akkor az utoljára megnyitott kapcsolatban + választ adatbázist. Ha ilyen sincs, akkor megpróbál a MySQL szerverhez + kapcsolódni úgy, mintha a <function>mysql_connect</function> függvény + lett volna meghívva paraméterek nélkül. </para> <para> - Every subsequent call to <function>mysql_query</function> will be - made on the active database. + Az összes további <function>mysql_query</function> függvény az aktív + adatbázison fog történni. </para> - <para> See also: + <para> Lásd még a <function>mysql_connect</function>, - <function>mysql_pconnect</function>, and - <function>mysql_query</function>. + <function>mysql_pconnect</function> és a + <function>mysql_query</function> függvényeket! </para> <para> - For downward compatibility <function>mysql_selectdb</function> - can also be used. + Kompatíbilitási okokból a <function>mysql_selectdb</function> + függvény is használható. </para> </refsect1> </refentry> @@ -1983,140 +1848,43 @@ <refentry id="function.mysql-tablename"> <refnamediv> <refname>mysql_tablename</refname> - <refpurpose>Get table name of field</refpurpose> + <refpurpose>Egy tábla nevével tér vissza</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>Leírás</title> <funcsynopsis> <funcprototype> <funcdef>string <function>mysql_tablename</function></funcdef> - <paramdef>resource <parameter>result</parameter></paramdef> + <paramdef>int <parameter>result</parameter></paramdef> <paramdef>int <parameter>i</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>mysql_tablename</function> takes a result pointer - returned by the <function>mysql_list_tables</function> function - as well as an integer index and returns the name of a table. The - <function>mysql_num_rows</function> function may be used to - determine the number of tables in the result pointer. + A <function>mysql_tablename</function> függvény veszi a + <function>mysql_list_tables</function> függvény által visszaadott + eredmény-mutatót és egy indexet, majd megmondja az oszlophoz tartozó + tábla nevét. A + <function>mysql_num_rows</function> függvény használható arra, hogy + megmondja hány tábla van az eredményhalmazban. <example> - <title><function>mysql_tablename</function> Example</title> + <title><function>Mysql_tablename</function> példa</title> <programlisting role="php"> &lt;?php mysql_connect ("localhost:3306"); -$result = mysql_list_tables ("wisconsin"); +$eredmeny = mysql_list_tables ("wisconsin"); $i = 0; -while ($i &lt; mysql_num_rows ($result)) { - $tb_names[$i] = mysql_tablename ($result, $i); +while ($i &lt; mysql_num_rows ($eredmeny)) { + $tb_names[$i] = mysql_tablename ($eredmeny, $i); echo $tb_names[$i] . "&lt;BR>"; $i++; } -?&gt; +?> </programlisting> </example> </para> </refsect1> </refentry> - <refentry id="function.mysql-get-client-info"> - <refnamediv> - <refname>mysql_get_client_info</refname> - <refpurpose>Get MySQL client info</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>mysql_get_client_info</function></funcdef> - <void/> - </funcprototype> - </funcsynopsis> - <para> - <function>mysql_get_client_info</function> returns a string that represents - the client library version. - </para> - <para> - <function>mysql_get_client_info</function> was added in PHP 4.0.5. - </para> - </refsect1> - </refentry> - - <refentry id="function.mysql-get-host-info"> - <refnamediv> - <refname>mysql_get_host_info</refname> - <refpurpose>Get MySQL host info</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>mysql_get_host_info</function></funcdef> - <paramdef>resource <parameter><optional>link_identifier</optional></parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - <function>mysql_get_host_info</function> returns a string - describing the type of connection in use for the connection - <parameter>link_identifier</parameter>, including the server host name. - If <parameter>link_identifier</parameter> is omited, the last opened - connection will be used. - </para> - <para> - <function>mysql_get_host_info</function> was added in PHP 4.0.5. - </para> - </refsect1> - </refentry> - - <refentry id="function.mysql-get-proto-info"> - <refnamediv> - <refname>mysql_get_proto_info</refname> - <refpurpose>Get MySQL protocol info</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>mysql_get_proto_info</function></funcdef> - <paramdef>resource <parameter><optional>link_identifier</optional></parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - <function>mysql_get_proto_info</function> returns the protocol version - used by connection <parameter>link_identifier</parameter>. - If <parameter>link_identifier</parameter> is omited, the last opened - connection will be used. - </para> - <para> - <function>mysql_get_proto_info</function> was added in PHP 4.0.5. - </para> - </refsect1> - </refentry> - - <refentry id="function.mysql-get-server-info"> - <refnamediv> - <refname>mysql_get_server_info</refname> - <refpurpose>Get MySQL server info</refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>mysql_get_server_info</function></funcdef> - <paramdef>resource <parameter><optional>link_identifier</optional></parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - <function>mysql_get_server_info</function> returns the server version - used by connection <parameter>link_identifier</parameter>. - If <parameter>link_identifier</parameter> is omited, the last opened - connection will be used. - </para> - <para> - <function>mysql_get_server_info</function> was added in PHP 4.0.5. - </para> - </refsect1> - </refentry> </reference> <!-- Keep this comment at the end of the file @@ -2134,5 +1902,4 @@ sgml-local-catalogs:nil sgml-local-ecat-files:nil End: -vi: et:ts=1:sw=1:textwidth=78:syntax=sgml -->
« previous php.doc (#969337339) next »