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.
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;jlim@natsoft.com) 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/phplens.config.inc.php. Eg.