Rozdiely pre phpMyEdit/doc/sgml/configuration.fields.sgml medzi verziami 1.40 a 1.41
| verzia 1.40, 2004/01/20 10:45:00 |
verzia 1.41, 2004/01/20 11:02:59 |
|
|
| <!-- $Platon: phpMyEdit/doc/sgml/configuration.fields.sgml,v 1.39 2003/12/30 21:22:45 nepto Exp $ --> |
<!-- $Platon: phpMyEdit/doc/sgml/configuration.fields.sgml,v 1.40 2004/01/20 10:45:00 nepto Exp $ --> |
| |
|
| <!-- Categories: |
<!-- Categories: |
| |
|
| Riadok 851 $opts['fdd']['col_name']['sqlw'] = 'IF($ |
|
| Riadok 851 $opts['fdd']['col_name']['sqlw'] = 'IF($ |
|
| ]]></programlisting> |
]]></programlisting> |
| </example> |
</example> |
| |
|
| |
</para> |
| |
<para> |
| |
|
| |
Another example of the <varname>['sqlw']</varname> usage is the storage of |
| |
user passwords. It is good idea to process user password using some well-known |
| |
hash function before saving it in the database. Following statement is used in |
| |
order to avoid re-hashing an already hashed string. This means, if |
| |
<varname>col_name</varname> value was not changed, then do not apply |
| |
<function>MD5()</function> on it. If <varname>col_name</varname> value was |
| |
changed, then apply <function>MD5()</function> function. |
| |
|
| |
<example> |
| |
<title>Storing password's MD5 hash</title> |
| |
<programlisting><![CDATA[ |
| |
$opts['fdd']['col_name']['sqlw'] = 'IF(col_name = $val_qas, $val_qas, MD5($val_qas))' |
| |
]]></programlisting> |
| |
</example> |
| |
|
| </para> |
</para> |
| </sect1> |
</sect1> |
| <sect1 id="configuration.tabs-feature"> |
<sect1 id="configuration.tabs-feature"> |
Platon Group <platon@platon.sk> http://platon.sk/
|
|