A new version of the Google Site Search module for Joomla 2.5 was published get more infos here.


phone-number check in constraint

If you need to verify phone number or other fields, and you want to ensure that not all characters can be used, the best is to use a check-constraint. The following constraint is simple, and fast 100 times faster than using a pl/sql-function (tested with 2mio records) because it is used directly on the table and there is no switching between the sql and pl/sql-engine. fast

alter table customer  add constraint ck_phone_numeric  check ((RPAD(TRANSLATE(phoneno,'0123456789+-X','XXXXXXXXXXXXa'),20,'X')='XXXXXXXXXXXXXXXXXXXX'));

You have to replace the length of the column (in this case 20) to the length of your column and of course the table name...

    Veröffentlichen Sie ihre Kommentare ...

    Warning: Creating default object from empty value in /www/htdocs/w0101274/www/fairtec.at/modules/mod_udjacomments/helper.php on line 387