Password Field Snippets


This will return the number of seconds between now and when the time field was inserted.

11 November, 2013   

These are two JavaScript functions that should of course be properly called on "onkeyup" event in the appropriate fields.

his snippet was created under the inspiration of using the django-multilingual package. Also an additional code is used to solve the problem of saving the many-to-many relations in embedded forms (http://trac.symfony-project.org/ticket/5867#comment:21). The idea is that in all embedded I18n forms appears checkbox "delete" for each...

Must have a field named Weight. The more Weight the more often the record is selected. Weight should be an integer between 1 and 10.

26 January, 2013   

Once the keycode of the spacebar is detected, it returns false which disallow the entering of space.

31 July, 2012   

Code example for TSQL COVERING INDEX

PHP & Mysql based code to Print table with client-side sorting function.

21 May, 2012   

PHP example for connecting to MySQL

The mysql_fetch_assoc "converts" a row from a table into an associative array. The mysql_insert_array "converts" an associative array into a row in a table.

09 May, 2011   

This is a general code to use when selecting an item from a MySQL database. This code isn't considered definitive and can be written in many varied ways. Note: This code requires you to connect to the MySQL database to work. Also, all field and table names need to be set up to match. This MYSQL Code using in PHP

13 June, 2016   

As a "preview" of text, this MySQL select will return the first few words out of a text field in a database. It returns entire words (doesn't cut them off in the middle) and follows the last word with an elipse "..."

Asp.Net code snippet for Database Query Within WebServices

01 September, 2014   

MySQL code example to assign random passwords

01 March, 2011   

Function that generates random passwords.

23 November, 2013   

Lets say you have a table with field called "tags" that consists from tags separated by commas and you want to check whether it includes a required tag. Here the simplest ways of doing that.

This stored sql procedure is used to replace a special character (or string) of your field with another string.

Demonstrates to select all the Birthdays that will occur as of today, 15 days

18 June, 2013   

Define few variables with your MySQL database connection settings and connect to MySQL database using mysql_connect() and mysql_select_db() functions.

Select all the Birthdays that will occur as of today, 15 days

To create the formatter paste this code into a new file and name it sfWidgetFormSchemaFormatterDefList.class.php. I saved it in /lib but it also makes sense to put it in /lib/form, depending on your personal preference.