Update Field Snippets


23 March, 2011   

When using forms within your web site, there may be times when you will want to include an example of what you'd like your visitors to fill in your form field. Although you could place some default text within your form field, your users would need to delete the default text in order to type in their own information.

How to dynamically update your Snippets

01 October, 2013   

This class has lots of common functionality built right into it. It also supports Mysql and Sphinx.

05 October, 2016   

This code accumulates 100 units of part number 9999 from various storage bins

12 January, 2014   

This is a pretty simple little snippet, but it help understanding how to use relational tables w/in PHP.

09 May, 2011   

This is a general code to use when inserting an item from a MySQL database. This code isn't considered definitive and can be written in many varied ways. An extention of this code would be to make sure the entry you are adding to the database doesn't already exist (to save dupicate entries). Note: This code requires you to connect to the MySQL...

10 October, 2012   

This query will return the amount of records for the query

14 September, 2014   

Selects the minimum value of the field in the brackets.

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

24 July, 2013   

An example of how to use the mysql_real_escape_string

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

23 November, 2013   

You can search and replace fields by below query in MySQL Database

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 "..."

12 January, 2012   

Example for Dumping a database to HTML tables

Toggle a column bit regardless of state. Useful to change state without doing a query first to detect the state of the bit.