home  products examples manual  faq support forum  contact news  login store

More Examples:   View Source:   Popup Hot Updates Demo

Free Download

This is a preview of the new features of phpLens available in March 2002. The two most new exciting features in phpLens 2.0 are editing multiple rows in a grid, and hot updates.
  • You can now edit multiple records then click on Save to update your database.
  • Hot updates of popup lists work when editing (change the Country and see the State and City popups update themselves) and when searching (click on the search button on the top right).
Live Demo below. Try changing things and see how phpLens hot updates work!

This is a Demo. You can not change anything for security reasons.
Back to Grid     phpLens Settings  Column Settings   Choose   Generate PHP Code   Remove All Settings   ?  
FieldCITY   Type: string[72]   Change Type
Default Title
Grid Title
Edit Title 2 Fields in Row
New Title 2 Fields in Row
Edit Notes
Use {KEY} to incorporate primary key, and prefix ?EDIT? or ?NEW? to display note only in EDIT or NEW state
Detail Title 2 Fields in Row
Filter Title
Input Dimensions
(suggested size: 48 x 1)
Columns:   Rows:

Power Lens
Lookup Values
Input Type        
# check/radio columns
Overlib Text
Search Lookup when editing
Matching above sql with fields
Minimum character length   Search mode   Hide key code
 X: 0-9 A-Z             x: 0-9 A-Z optional       Z: 0-9 A-Z _            z: 0-9 A-Z _ optional
#: 0-9 9: 0-9 optional +: positive numbers only
&: any character ?: any character optional \: escape character >: to uppercase <: to lowercase =EMAIL: email validation
Validation Error Msg
Default New Value
Prefix value with = to execute PHP code and % for SQL function
Optional Editable ColumnEnabled when Column   has value Enter A^B^C, or * for any non-empty value
Power Edit Lens
Grid TD Attributes   (nowrap, width=30%, align=center etc.)
Cell Color grid^title^input  
Color Reference opens in a new window

Section Break Title
Back color   CSS class

WYSIWYG Editor for fields that accept HTML
Do not convert
Special Chars
This Field supports Double-Byte (eg Chinese, Japanese) and HTML tags
Must FillNo   * Must Fill Columns
Read OnlyNo   - Read Only Columns
Visible in GridYes   Grid Columns
Visible in DetailsNo   Detail Columns
Visible in New RecordYes   * New Record Columns
Visible in Edit RecordYes   * Edit Columns
PHPLens: 4.9.2   Data: 0.02   DB: mysql   adodb: 4.62   Compat: 2   PHP: 5.2.17   OS: Linux
License Type: Enterprise   ID: (Natsoft;John Lim;   Valid Till: Never Expires

Mutiple Row Editing in Grid

To enable multiple row editing within the grid, you can use the phpLens settings screen, or set:

$lens->multipleEdit = true;

Hot Updates with Popups

Note how the city and state popups dynamicly update when the country changes. This uses our hot update technology to query the database server dynamically from your web browser and update the city and state fields.

PhpLens 2.0 now supports hot updates using a new lookupLens feature. Have a look at the following property setting:

$lens->lookupLens = "STATE^#select distinct state from cities where country={country};"

observe that the select statement is prefixed with #. This means that all variables enclosed in { } are actually data fields when creating or editing records. So if the COUNTRY popup field is set to "USA" in the browser, then we populate the STATE field with the values generated by:

select distinct state from cities where country='USA'

If you have codes and text descriptions, you can change your sql so that codes are stored but the more descriptive text is displayed:

$lens->lookupLens =
    "STATE^#select distinct statecode,statename from cities "
    ."where country={country};"

We have integrated these lookups with Javascript so that hot updates work from the browser. IE 5-6, Netscape 4.77 and Mozilla 0.9.* are supported. When you change the COUNTRY popup in the browser, we create an invisible browser window and query the web server (the page phplens_remote.php) with an SQL statement and retrieve the data from the database. The source code to phplens_remote.php is available for your review in the phpLens 2 release.

To keep track of what database that phplens_remote.php needs to query, we need to set a second property:

$lens->phplensDatabase = 'testdb';

This 'testdb' is a one of the databases you defined in the file phplens/config/ Eg.

array(			//driver, server, userid, pwd, database
	'testdb' => array('mysql','localhost','root','','test')
email: (change # to @)     telephone (malaysia): 60-3-7947 2888     fax (malaysia): 60-3-7947 2800