Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, October 14, 2026

Diff for phpMyEdit/doc/sgml/configuration.fields.sgml between version 1.34 and 1.35

version 1.34, 2003/12/11 12:29:47 version 1.35, 2003/12/15 14:32:22
Line 1 
Line 1 
 <!-- $Platon: phpMyEdit/doc/sgml/configuration.fields.sgml,v 1.33 2003/12/09 11:16:14 nepto Exp $ -->  <!-- $Platon: phpMyEdit/doc/sgml/configuration.fields.sgml,v 1.34 2003/12/11 12:29:47 nepto Exp $ -->
   
 <!-- Categories:  <!-- Categories:
   
Line 800  $opts['fdd']['title']['sqlw'] = 'TRIM("$
Line 800  $opts['fdd']['title']['sqlw'] = 'TRIM("$
 </para>  </para>
 <para>  <para>
   
   The first example above makes <varname>surname</> uppercase when storing field
   into database. The second one trims all whitespace characters around
   <varname>title</> before writting it to database.
   
   </para>
   <para>
   
 As a placeholder for the field's content, there are three variables available.  As a placeholder for the field's content, there are three variables available.
   
 <simplelist type="horiz" columns="2">  <simplelist type="horiz" columns="2">
Line 819  than <varname>$val_as</varname> becomes
Line 826  than <varname>$val_as</varname> becomes
 and <varname>$val_qas</varname> becomes  and <varname>$val_qas</varname> becomes
 <constant>"some\"nice\"thing"</constant>. You have to use these variables  <constant>"some\"nice\"thing"</constant>. You have to use these variables
 correctly in your <varname>['sqlw']</varname> expressions, otherwise MySQL  correctly in your <varname>['sqlw']</varname> expressions, otherwise MySQL
 parsing error could be occured.  parsing error could be occured. We recommend you to use
   <varname>$val_qas</varname> variable whenewer possible, as it is the most safe
   one from the mentioned alternatives.
   
   </para>
   <para>
   
   Very useful and favourite usage of <varname>['sqlw']</varname> option is to
   explicitly tell &name; to store <constant>NULL</constant> value instead of
   empty string for the particular column. Empty string and
   <constant>NULL</constant> are two different values. Many people really does
   not like empty strings in their tables, thus now they have possibility to
   change them for <constant>NULL</constant> when user simply fills nothing into
   form input field.
   
   <example>
   <title>Storing <constant>NULL</constant> instead of empty string</title>
   <programlisting><![CDATA[
   $opts['fdd']['col_name']['sqlw'] = 'IF($val_qas = "", NULL, $val_qas)'
   ]]></programlisting>
   </example>
   
 </para>  </para>
 </sect1>  </sect1>

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top