Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 14. október 2026

Rozdiely pre phpMyEdit/doc/sgml/configuration.fields.sgml medzi verziami 1.35 a 1.36

verzia 1.35, 2003/12/15 14:32:22 verzia 1.36, 2003/12/18 20:36:01
Riadok 1 
Riadok 1 
 <!-- $Platon: phpMyEdit/doc/sgml/configuration.fields.sgml,v 1.34 2003/12/11 12:29:47 nepto Exp $ -->  <!-- $Platon: phpMyEdit/doc/sgml/configuration.fields.sgml,v 1.35 2003/12/15 14:32:22 nepto Exp $ -->
   
 <!-- Categories:  <!-- Categories:
   
Riadok 777  $opts['fdd']['title']['sql'] = 'IF(TRIM(
Riadok 777  $opts['fdd']['title']['sql'] = 'IF(TRIM(
 </para>  </para>
 <para>  <para>
   
 First example appends content of <varname>firstname</> field to  The first example appends content of the <varname>firstname</> field to the
 <varname>surname</> field. Because this is done on the database level, sorting  <varname>surname</> field. Because this is done on the database level, sorting
 and searching (in table filtering page) on this field will properly work.  and searching (in table filtering page) on this field will properly work.
 Similarly in the second example, the <varname>title2</> field will be used if  Similarly in the second example, the <varname>title2</> field will be used if
 <varname>title</> field is empty. In this manner you can define some special  the <varname>title</> field is empty. In this manner you can define a special
 static string, which should be printed in case a field is empty. Just  static string, which should be printed in case a field is empty. Just
 substitute a quoted string in place of <varname>title2</>.  substitute a quoted string in place of <varname>title2</>.
   
Riadok 802  $opts['fdd']['title']['sqlw'] = 'TRIM("$
Riadok 802  $opts['fdd']['title']['sqlw'] = 'TRIM("$
   
 The first example above makes <varname>surname</> uppercase when storing field  The first example above makes <varname>surname</> uppercase when storing field
 into database. The second one trims all whitespace characters around  into database. The second one trims all whitespace characters around
 <varname>title</> before writting it to database.  <varname>title</> before writing it to database.
   
 </para>  </para>
 <para>  <para>
Riadok 813  As a placeholder for the field's content
Riadok 813  As a placeholder for the field's content
 <member> &nbsp; <varname>$val</varname></member>  <member> &nbsp; <varname>$val</varname></member>
 <member> -- value of the field</member>  <member> -- value of the field</member>
 <member> &nbsp; <varname>$val_as</varname></member>  <member> &nbsp; <varname>$val_as</varname></member>
 <member> -- value with applied <function>addslashes()</function> function</member>  <member> -- value with <function>addslashes()</function> function applied</member>
 <member> &nbsp; <varname>$val_qas</varname></member>  <member> &nbsp; <varname>$val_qas</varname></member>
 <member> -- same as <varname>$val_as</varname> with quotes around</member>  <member> -- same as <varname>$val_as</varname> with quotes around</member>
 </simplelist>  </simplelist>
Riadok 821  As a placeholder for the field's content
Riadok 821  As a placeholder for the field's content
 </para>  </para>
 <para>  <para>
   
 So if the <varname>$val</varname> is <constant>some"nice"thing</constant>,  If the <varname>$val</varname> is <constant>some"nice"thing</constant>, then
 than <varname>$val_as</varname> becomes <constant>some\"nice\"thing</constant>  <varname>$val_as</varname> becomes <constant>some\"nice\"thing</constant> and
 and <varname>$val_qas</varname> becomes  <varname>$val_qas</varname> becomes <constant>"some\"nice\"thing"</constant>.
 <constant>"some\"nice\"thing"</constant>. You have to use these variables  You have to use these variables correctly in your <varname>['sqlw']</varname>
 correctly in your <varname>['sqlw']</varname> expressions, otherwise MySQL  expressions, otherwise a MySQL parsing error could occur. We recommend you use
 parsing error could be occured. We recommend you to use  the <varname>$val_qas</varname> variable whenever possible, as it is the
 <varname>$val_qas</varname> variable whenewer possible, as it is the most safe  safest one from the mentioned alternatives.
 one from the mentioned alternatives.  
   
 </para>  </para>
 <para>  <para>
   
 Very useful and favourite usage of <varname>['sqlw']</varname> option is to  A very useful and favourite usage of the <varname>['sqlw']</varname> option is
 explicitly tell &name; to store <constant>NULL</constant> value instead of  to explicitly tell &name; to store a <constant>NULL</constant> value instead
 empty string for the particular column. Empty string and  of an empty string for the particular column. Empty string and
 <constant>NULL</constant> are two different values. Many people really does  <constant>NULL</constant> are two different values. Many people really do not
 not like empty strings in their tables, thus now they have possibility to  like empty strings in their tables, thus now they have possibility to change
 change them for <constant>NULL</constant> when user simply fills nothing into  them to <constant>NULL</constant> when user simply enters nothing into form
 form input field.  input field.
   
 <example>  <example>
 <title>Storing <constant>NULL</constant> instead of empty string</title>  <title>Storing <constant>NULL</constant> instead of empty string</title>

Legend:
Odstranené z verzie1.35  
zmenené riadky
  Pridané vo verzii1.36

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok