Oracle syntax: decode , 替換語法
Examples
This example decodes the value warehouse_id. If warehouse_id is 1, then the function returns ‘Southlake’; if warehouse_id is 2, then it returns ‘San Francisco’; and so forth. If warehouse_id is not 1, 2, 3, or 4, then the function returns ‘Non domestic’.
[PHP] Sample code : Berkeley DB , bdb , dba_open , db4 , key-value database ,
$id = dba_open("bdb4_tsid.db", "w", "db4"); if (!$id) { echo "dba_open failed\n"; exit; } dba_replace("key", "This is an example!", $id); if (dba_exists("key", $id)) { echo dba_fetch("key", $id); dba_delete("key", $id); } dba_close($id);
This is an example! exist: This is an example! ---> This is an example!
PHP Regex Validation of Hexadecimal Values / check hex number
preg_match( '/^[A-F0-9]{15,18}/',$v)