[PHP-DOC] cvs: phpdoc /en/functions mysql.xml
danbeck Thu Mar 8 13:56:37 2001 EDT Modified files: /phpdoc/en/functionsmysql.xml Log: added errata clarification and clean up some function examples Index: phpdoc/en/functions/mysql.xml diff -u phpdoc/en/functions/mysql.xml:1.36 phpdoc/en/functions/mysql.xml:1.37 --- phpdoc/en/functions/mysql.xml:1.36 Thu Feb 15 16:15:33 2001 +++ phpdoc/en/functions/mysql.xml Thu Mar 8 13:56:37 2001 @@ -46,10 +46,11 @@ - mysql_affected_rows returns the number of - rows affected by the last INSERT, UPDATE or DELETE query on the - server associated with the specified link identifier. If the - link identifier isn't specified, the last opened link is assumed. + mysql_affected_rows returns the number + of rows affected by the last INSERT, UPDATE or DELETE query + associated with link_identifier. If the + link identifier isn't specified, the last link opened by + mysql_connect is assumed. @@ -63,14 +64,27 @@ of the records will have been deleted from the table but this function will return zero. + + + When using UPDATE, MySQL will not update columns where the new + value is the same as the old value. This creates the possiblity + that mysql_affected_rows may not actually + equal the number of rows matched, only the number of rows that + were literally affected by the query. + + - This command is not effective for SELECT statements, only on - statements which modify records. To retrieve the number of rows - returned from a SELECT, use mysql_num_rows. + mysql_affected_rows does not work with + SELECT statements; only on statements which modify records. To + retrieve the number of rows returned by a SELECT, use + mysql_num_rows. If the last query failed, this function will return -1. + + See also: mysql_num_rows. + @@ -242,11 +256,13 @@ MySQL connect example + +?> See also @@ -1533,29 +1549,30 @@ mysql_num_rows 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, use mysql_affected_rows. + DELETE query, use mysql_affected_rows. - - -mysql_num_rows example by [EMAIL PROTECTED] - - + mysql_num_rows example + +$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"; + +?> See also: - mysql_db_query, - mysql_query and, - mysql_fetch_row. + mysql_affected_rows, + mysql_connect, + mysql_select_db and + mysql_query. For downward compatibility mysql_numrows can
Re: [PHP-DOC] faq -> manual
> What about adding the FAQ to the manual? ^^ I just intended to write *moving* here... Goba __ Hungarian PHP Manual :: Hungarian PHP Mirror :: http://hu.php.net/ The starintg-point for Hungarian webmasters :: http://weblabor.hu/
[PHP-DOC] faq -> manual
Hi! What about adding the FAQ to the manual? This was a longly discussed topic, and the end was this needs to be done (as I can remember). This is a good time for this, when the site also changes... And that way, the FAQ would also be international, which would be a real good point... Goba __ Hungarian PHP Manual :: Hungarian PHP Mirror :: http://hu.php.net/ The starintg-point for Hungarian webmasters :: http://weblabor.hu/
[PHP-DOC] cvs: phpdoc /en/functions misc.xml
danbeck Thu Mar 8 11:47:24 2001 EDT Modified files: /phpdoc/en/functionsmisc.xml Log: added docs for the new constant function Index: phpdoc/en/functions/misc.xml diff -u phpdoc/en/functions/misc.xml:1.37 phpdoc/en/functions/misc.xml:1.38 --- phpdoc/en/functions/misc.xml:1.37 Thu Mar 8 09:57:13 2001 +++ phpdoc/en/functions/misc.xmlThu Mar 8 11:47:23 2001 @@ -75,6 +75,52 @@ + + +constant +Returns the value of a constant + + +Description + + + mixed constant + string name + + + + constant will return the value of the + constant indicated by name. + + + constant is useful if you need to retrieve + the value of a constant, but do not know it's name. i.e. It is + stored in a variable or returned by a function. + + + + constant example + ++ + + + + See also define, + defined and the section on Constants. + + + + + define @@ -147,7 +193,8 @@ an error occurs. - See also defined and the section on defined, + constant and the section on Constants. @@ -183,7 +230,8 @@ - See also define and the section on define, + constant and the section on Constants.
[PHP-DOC] ADV: NEW CONCEPTS
DIRECT INVITATION: ANOTHER CHANCE TO PARTICIPATE FREE LEADS TO ALL WHO ARE SERIOUS!! THOUSANDS WILL BE MADE IN THE NEXT FEW DAYS!! THE LONGER YOU WAIT, THE MORE YOU MISS OUT ON!! YOU WILL BE PAYED IN CASH!! PLUG IN TO OUR UNIQUE SYSTEM AND MAXIMIZE YOUR INCOME!! TAKE A LOOK BELOW!! http://www.geocities.com/success35206/ *** THIS EMAIL COMPLIES WITH ALL REGULATIONS AND IS NOT SPAM. TO PERMANENTLY REMOVE YOURSELF FROM THE LIST SIMPLY EMAIL [EMAIL PROTECTED] WITH "REMOVE" AS THE SUBJECT LINE. ***
[PHP-DOC] cvs: phpdoc /en/functions misc.xml
danbeck Thu Mar 8 09:57:13 2001 EDT Modified files: /phpdoc/en/functionsmisc.xml Log: added example of die using a function as a parameter Index: phpdoc/en/functions/misc.xml diff -u phpdoc/en/functions/misc.xml:1.36 phpdoc/en/functions/misc.xml:1.37 --- phpdoc/en/functions/misc.xml:1.36 Thu Mar 8 08:30:37 2001 +++ phpdoc/en/functions/misc.xmlThu Mar 8 09:57:13 2001 @@ -205,17 +205,46 @@ - This language construct outputs a message and terminates parsing - of the script. It does not return anything. + die outputs message + and terminates parsing of the script. It does not return + anything. + + Alternatively, die will also accept a + function as a parameter. That function will be executed + before die terminates parsing of the script. + - die example + die example + + + + + + die example using a function + +
[PHP-DOC] cvs: phpdoc /en/functions misc.xml
danbeck Thu Mar 8 08:30:38 2001 EDT Modified files: /phpdoc/en/functionsmisc.xml Log: added security warnings about show_source and highlight_file Index: phpdoc/en/functions/misc.xml diff -u phpdoc/en/functions/misc.xml:1.35 phpdoc/en/functions/misc.xml:1.36 --- phpdoc/en/functions/misc.xml:1.35 Fri Nov 3 17:16:10 2000 +++ phpdoc/en/functions/misc.xmlThu Mar 8 08:30:37 2001 @@ -434,7 +434,17 @@ using the colors defined in the built-in syntax highlighter for PHP. It returns true on success, false otherwise (PHP 4). - + + + Care should be taken when using the + show_source and + highlight_file functions to make sure that + you do not inadvertently reveal sensitive information such as + passwords or any other type of information that might create a + potential security risk. + + + Creating a source highlighting URL @@ -448,11 +458,12 @@ In your httpd.conf you can add the following: - + +ForceType application/x-httpd-php - + And then make a file named "source" and put it in your @@ -490,9 +501,9 @@ - + http://your.server.com/source/path/to/script.php - + @@ -793,10 +804,18 @@ using the colors defined in the built-in syntax highlighter for PHP. It returns true on success, false otherwise (PHP 4). + + This function is an alias for the function + highlight_file + - This function is an alias for the function - highlight_file + Care should be taken when using the + show_source and + highlight_file functions to make sure that + you do not inadvertently reveal sensitive information such as + passwords or any other type of information that might create a + potential security risk.
[PHP-DOC] cvs: phpdoc /fr/language control-structures.xml
damsThu Mar 8 05:55:38 2001 EDT Modified files: /phpdoc/fr/language control-structures.xml Log: "break" doesn't work with "if" Index: phpdoc/fr/language/control-structures.xml diff -u phpdoc/fr/language/control-structures.xml:1.10 phpdoc/fr/language/control-structures.xml:1.11 --- phpdoc/fr/language/control-structures.xml:1.10 Tue Mar 6 10:31:37 2001 +++ phpdoc/fr/language/control-structures.xml Thu Mar 8 05:55:38 2001 @@ -546,8 +546,7 @@ break L'instruction break permet de sortir d'une structure - if, for, while, ou - switch. + for, while, ou switch. break accepte un argument numérique optionnel
[PHP-DOC] cvs: phpdoc /fr/functions funchand.xml
damsThu Mar 8 05:07:51 2001 EDT Modified files: /phpdoc/fr/functionsfunchand.xml Log: Compatible XML Index: phpdoc/fr/functions/funchand.xml diff -u phpdoc/fr/functions/funchand.xml:1.10 phpdoc/fr/functions/funchand.xml:1.11 --- phpdoc/fr/functions/funchand.xml:1.10 Thu Mar 8 02:52:10 2001 +++ phpdoc/fr/functions/funchand.xmlThu Mar 8 05:07:51 2001 @@ -94,8 +94,9 @@ - Appelle la fonction utilisateur function_name, et lui - passe les paramètres parameter. + call_user_func appelle la fonction utilisateur + function_name, et lui passe les paramètres + parameter. Par exemple : @@ -107,7 +108,6 @@ call_user_func ('barbier', "au bol"); - Voir aussi :
[PHP-DOC] cvs: phpdoc /fr/functions classobj.xml filesystem.xml funchand.xml ifx.xml oci8.xml recode.xml regex.xml sybase.xml var.xml
damsThu Mar 8 02:52:10 2001 EDT Modified files: /phpdoc/fr/functionsfilesystem.xml funchand.xml ifx.xml oci8.xml recode.xml regex.xml sybase.xml var.xml classobj.xml Log: Illegal chars again... Index: phpdoc/fr/functions/filesystem.xml diff -u phpdoc/fr/functions/filesystem.xml:1.14 phpdoc/fr/functions/filesystem.xml:1.15 --- phpdoc/fr/functions/filesystem.xml:1.14 Thu Mar 8 02:48:53 2001 +++ phpdoc/fr/functions/filesystem.xml Thu Mar 8 02:52:10 2001 @@ -435,9 +435,9 @@ ou fsockopen. - Voir aussi fread, + Voir aussi fread, fopen, - popen, + popen, fsockopen et fgets. @@ -570,9 +570,9 @@ - Voir aussi fread, + Voir aussi fread, fopen, - popen, + popen, fgetc, fsockopen et socket_set_timeout. @@ -1277,9 +1277,9 @@ - Sur les systèmes qui différentient les fichiers - textes et binaires (i.e. Windows) le fichier doit être - ouvert avec la lettre 'b' ajoutée au paramètre + Sur les systèmes qui différentient les fichiers + textes et binaires (i.e. Windows) le fichier doit être + ouvert avec la lettre 'b' ajoutée au paramètre de mode de la fonction fopen. @@ -1298,11 +1298,11 @@ - Voir aussi fwrite, + Voir aussi fwrite, fopen, - fsockopen, + fsockopen, popen, - fgets, + fgets, fgetss, file et fpassthru. @@ -2220,7 +2220,7 @@ correctement ouvert par fopen. - Voir aussi fseek et + Voir aussi fseek et ftell. @@ -2294,7 +2294,7 @@ les autres systèmes (i.e. Windows) retourne -1. - Les résultats de stat sont mis en cache. + Les résultats de stat sont mis en cache. Reportez-vous à la fonction clearstatcache pour plus de détails. Index: phpdoc/fr/functions/funchand.xml diff -u phpdoc/fr/functions/funchand.xml:1.9 phpdoc/fr/functions/funchand.xml:1.10 --- phpdoc/fr/functions/funchand.xml:1.9Thu Mar 8 02:48:53 2001 +++ phpdoc/fr/functions/funchand.xmlThu Mar 8 02:52:10 2001 @@ -11,28 +11,28 @@ call_user_func_array - Appelle une fonction utilisateur avec les paramètres rassemblés en tableau + Appelle une fonction utilisateur avec les paramètres rassemblés en +tableau Description - mixed + mixed call_user_func_array - string + string function_name - array + array paramarr call_user_func_array appelle la fonction utilisateur - function_name avec les paramètres - paramarr, rassemblés dans un tableau. + function_name avec les paramètres + paramarr, rassemblés dans un tableau. Par exemple: @@ -45,10 +45,8 @@ echo "\n$val\n"; echo "***\n"; } - $c = mysql_connect(); $host = $HTTP_SERVER_VARS["SERVER_NAME"]; - call_user_func_array ('debug', array("host", $host)); call_user_func_array ('debug', array("c", $c)); call_user_func_array ('debug', array("HTTP_POST_VARS", $HTTP_POST_VARS)); @@ -59,12 +57,12 @@ Voir aussi : call_user_func, - call_user_method et + call_user_method et call_user_method_array. - call_user_func_array a été ajouté + call_user_func_array a été ajouté en version PHP 4.05. Index: phpdoc/fr/functions/ifx.xml diff -u phpdoc/fr/functions/ifx.xml:1.5 phpdoc/fr/functions/ifx.xml:1.6 --- phpdoc/fr/functions/ifx.xml:1.5 Thu Mar 8 02:48:53 2001 +++ phpdoc/fr/functions/ifx.xml Thu Mar 8 02:52:10 2001 @@ -1436,7 +1436,7 @@ la position du pointeur de fichier, pour un objet SLOB ouvert. bid est un identifiant d'objet SLOB. Les modes valides sont : 0 = LO_SEEK_SET, 1 = LO_SEEK_CUR, 2 = LO_SEEK_END et - offset est un octet d'offset. + offset est un octet d'offset. ifxus_seek_blob retourne FALSE en cas d'erreur, et sinon, la position du pointeur de fichier. Index: phpdoc/fr/functions/oci8.xml diff -u phpdoc/fr/functions/oci8.xml:1.9 phpdoc/fr/functions/oci8.xml:1.10 --- phpdoc/fr/functions/oci8.xml:1.9Thu Mar 8 02:48:53 2001 +++ phpdoc/fr/functions/oci8.xmlThu Mar 8 02:52:10 2001 @@ -1098,7 +1098,7 @@ - Exemple avec OCIColumnType + Exemple avec ocicolumntype\n"; @@ -1131,7 +1131,7 @@ - Voir aussi ocinumcols, + Voir aussi ocinumcols, ocicolumnname et ocicolumnsize. @@ -1154,7 +1154,7 @@ ociserverversion retourne une chaîne contenant les informations de version du serveur - Exemple avec OCIServerVersion + Exemple avec ociserverv
[PHP-DOC] cvs: phpdoc /fr/functions classobj.xml filesystem.xml funchand.xml gmp.xml hw.xml ifx.xml imap.xml info.xml mcal.xml oci8.xml posix.xml recode.xml regex.xml satellite.xml sybase.xml var.xml yaz.xml
damsThu Mar 8 02:48:54 2001 EDT Modified files: /phpdoc/fr/functionsclassobj.xml filesystem.xml funchand.xml gmp.xml hw.xml ifx.xml imap.xml info.xml mcal.xml oci8.xml posix.xml recode.xml regex.xml satellite.xml sybase.xml var.xml yaz.xml Log: Keeping up with Jesus's updates. Fixing some misnamed functions (as in En tree). Index: phpdoc/fr/functions/classobj.xml diff -u phpdoc/fr/functions/classobj.xml:1.7 phpdoc/fr/functions/classobj.xml:1.8 --- phpdoc/fr/functions/classobj.xml:1.7Wed Mar 7 10:08:43 2001 +++ phpdoc/fr/functions/classobj.xmlThu Mar 8 02:48:53 2001 @@ -163,6 +163,51 @@ + + +call_user_method_array + + Appelle une méthode utilisateur avec un tableau de paramètres + + + +Description + + + mixed + call_user_method_array + + string + method_name + + object + obj + + array + paramarr + + + + + call_user_method_array appelle la méthode + method_name de l'object obj, + en utilisant les paramètres paramarr, rassemblés + sous forme de tableau. + + + Voir aussi : + call_user_func_array, + call_user_func et + call_user_method. + + + + call_user_method_array a été ajoutée en version + PHP 4.05. + + + + call_user_method @@ -222,7 +267,10 @@ - Voir aussi call_user_func. + Voir aussi : + call_user_func_array. + call_user_func et + call_user_method_array. @@ -311,30 +359,11 @@ - get_object_vars - Retourne un talbeau associatif des propriétés d'un objet + Retourne un tableau associatif des propriétés d'un objet @@ -347,10 +376,11 @@ get_object_vars retourne un tableau associatif - contenant les propriétés de l'objet obj. Les - clés du tableau sont les noms des propriétés de l'objet.Si des variables - déclarées dans la classe de l'objet obj, - n'ont pas été assignées, elles ne seront pas retournées dans le tableau. + contenant les propriétés de l'objet obj. + Les clés du tableau sont les noms des propriétés + de l'objet.Si des variables déclarées dans la classe de + l'objet obj, n'ont pas été + assignées, elles ne seront pas retournées dans le tableau. Exemple avec get_object_vars @@ -392,7 +422,7 @@ - Voir aussi get_class_methods, + Voir aussi get_class_methods et get_class_vars Index: phpdoc/fr/functions/filesystem.xml diff -u phpdoc/fr/functions/filesystem.xml:1.13 phpdoc/fr/functions/filesystem.xml:1.14 --- phpdoc/fr/functions/filesystem.xml:1.13 Wed Mar 7 10:08:43 2001 +++ phpdoc/fr/functions/filesystem.xml Thu Mar 8 02:48:53 2001 @@ -435,8 +435,10 @@ ou fsockopen. - Voir aussi fread, fopen, - popen, fsockopen, et + Voir aussi fread, + fopen, + popen, + fsockopen et fgets. @@ -568,9 +570,11 @@ - Voir aussi fread, fopen, - popen, fgetc, - fsockopen, et + Voir aussi fread, + fopen, + popen, + fgetc, + fsockopen et socket_set_timeout. @@ -1264,38 +1268,44 @@ - Sur les systèmes qui différentient les fichiers textes et binaires - (i.e. Windows) le fichier doit être ouvert avec la lettre 'b' ajoutée au - paramètre de mode de la fonction fopen. + Sur les systèmes qui différentient les fichiers + textes et binaires (i.e. Windows) le fichier doit être + ouvert avec la lettre 'b' ajoutée au paramètre + de mode de la fonction fopen. - - + + - - - + + + + - Voir aussi fwrite, fopen, - fsockopen, popen, - fgets, fgetss, - file, et fpassthru. + Voir aussi fwrite, + fopen, + fsockopen, + popen, + fgets, + fgetss, + file et + fpassthru. @@ -1454,7 +1464,7 @@ type les autres systèmes (i.e. Windows) retourne -1. - Les résultats de fsta
[PHP-DOC] cvs: phpdoc /en/functions gmp.xml pcre.xml posix.xml recode.xml regex.xml yaz.xml
damsThu Mar 8 02:47:18 2001 EDT Modified files: /phpdoc/en/functionspcre.xml posix.xml recode.xml regex.xml yaz.xml gmp.xml Log: Fixing a bunch of mis-named functions. Index: phpdoc/en/functions/pcre.xml diff -u phpdoc/en/functions/pcre.xml:1.45 phpdoc/en/functions/pcre.xml:1.46 --- phpdoc/en/functions/pcre.xml:1.45 Wed Feb 28 16:22:02 2001 +++ phpdoc/en/functions/pcre.xmlThu Mar 8 02:47:17 2001 @@ -941,9 +941,11 @@ - + Regular Expression Details - + + Introduction + The syntax and semantics of the regular expressions sup- ported by PCRE are described below. Regular expressions are also described in the Perl documentation and in a number of @@ -960,7 +962,13 @@ The quick brown fox matches a portion of a subject string that is identical to - itself. The power of regular expressions comes from the + itself. + + + +Meta-caracters + + The power of regular expressions comes from the ability to include alternatives and repetitions in the pat- tern. These are encoded in the pattern by the use of meta- characters, which do not stand for themselves but instead @@ -998,10 +1006,11 @@ The following sections describe the use of each of the meta-characters. - - - -BACKSLASH + + + +backslash + The backslash character has several uses. Firstly, if it is followed by a non-alphameric character, it takes away any special meaning that character may have. This use of @@ -1156,12 +1165,11 @@ \Z and \z is that \Z matches before a newline that is the last character of the string as well as at the end of the string, whereas \z matches only at the end. - - - - - -CIRCUMFLEX AND DOLLAR + + + +Cicumflex and dollar + Outside a character class, in the default matching mode, the circumflex character is an assertion which is true only if the current matching point is at the start of the subject @@ -1207,10 +1215,11 @@ the start and end of the subject in both modes, and if all branches of a pattern start with \A is it always anchored, whether PCRE_MULTILINE is set or not. - - - -FULL STOP (PERIOD, DOT) + + + +FULL STOP + Outside a character class, a dot in the pattern matches any one character in the subject, including a non-printing character, but not (by default) newline. If the PCRE_DOTALL @@ -1219,10 +1228,11 @@ cumflex and dollar, the only relationship being that they both involve newline characters. Dot has no special meaning in a character class. - - - -SQUARE BRACKETS + + + +Square brackets + An opening square bracket introduces a character class, ter- minated by a closing square bracket. A closing square bracket on its own is not special. If a closing square @@ -1297,10 +1307,11 @@ All non-alphameric characters other than \, -, ^ (at the start) and the terminating ] are non-special in character classes, but it does no harm if they are escaped. - - - -VERTICAL BAR + + + +Vertical bar + Vertical bar characters are used to separate alternative patterns. For example, the pattern @@ -1314,10 +1325,11 @@ subpattern (defined below), "succeeds" means matching the rest of the main pattern as well as the alternative in the subpattern. - - - -INTERNAL OPTION SETTING + + + +Internal option setting + The settings of PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and PCRE_EXTENDED can be changed from within the pattern by a sequence of Perl option letters enclosed between "(?" and @@ -1382,10 +1394,11 @@ setting is special in that it must always occur earlier in the pattern than any of the additional features it turns on, even when it is at top level. It is best put at the start. - - - -SUBPATTERNS + + + +subpatterns + Subpatterns are delimited by parentheses (round brackets), which can be nested. Marking part of a pattern as a subpat- tern does two things: @@ -1444,10 +1457,11 @@ reset until the end of the subpattern is reached, an option setting in one branch does affect subsequent branches, so the above patterns match "SUNDAY" as well as "Saturday". - - - -REPETITION + + + +Repetition + Repetition is specified by quantifiers, which can follow any of the following items: @@ -1583,10 +1597,11 @@ matches "aba" the value of the second captured substring is "b". - - - -BAC