phpLens
 home  products examples manual  faq support forum  contact news  login store

More Examples:   View Source:   searchInEditNew

Free Download

This demo allows you to enter complaint records for products you are supporting. You can perform a search in the both the EDIT/NEW record forms for the product the customer is complaining about. Hint: search on R in the "prodname" field below.

  PHPLens
E Nxt End New Srch
(E) (e)id (e)prodname (e)custname (e)telephone (e)Complaint
1
2644
Collette PateRaphael Cervantes(692)634-4794http://jmgmypium.com/07t/3r http://nhroiv.com/72x/1e http://vwsevihm.com/ofn/w http://birkkane.com/92y/m http://ouvthweg.com/qm8/3p http://jmgmypium.com/pvu/4d http://nhroiv.com/wd4/b http://vwsevihm.com/1z http://birkkane.com/io3/3u http://
2
2652
buy cheap cialisbuy cheap cialis(414)702-2454faebfwka, <a href="http://www.dvxuser.com/V6/member.php?u=49474">cialis sale</a>, [url="http://www.dvxuser.com/V6/member.php?u=49474"]cialis sale[/url], http://www.dvxuser.com/V6/member.php?u=49474 cialis sale, msgtehvg, <a href="http://www.dvxuser.
3
2646
Gus BaldwinSharlene Collier(923)360-5440http://jmgmypium.com/3ms/14 http://birkkane.com/jfs/4m http://nhroiv.com/hj6/4p http://vwsevihm.com/hcf/4c http://ouvthweg.com/du7/1l http://jmgmypium.com/fmw/4g http://birkkane.com/jfs/39 http://nhroiv.com/6b3/4g http://vwsevihm.com/hcf/15
4
2645
levitra francelevitra france(842)262-4971kpoivqou, <a href="http://bowzone.ca/forum/member.php?u=7761">viagra sale</a>, [url="http://bowzone.ca/forum/member.php?u=7761"]viagra sale[/url], http://bowzone.ca/forum/member.php?u=7761 viagra sale, mdranyco, <a href="http://www.moviesonline.ca/f
5
2647
buy viagrabuy viagra(731)918-7410qzwxaejs, <a href="http://bowzone.ca/forum/member.php?u=7761">viagra</a>, [url="http://bowzone.ca/forum/member.php?u=7761"]viagra[/url], http://bowzone.ca/forum/member.php?u=7761 viagra, ppcbjtza, <a href="http://forum.calgarypuck.com/member.php?u=9
6
2648
Alana RowlandDeidre Gonzalez(632)738-7382http://birkkane.com/io3/4q http://nhroiv.com/72x/2r http://ouvthweg.com/qm8/1z http://vwsevihm.com/3u http://jmgmypium.com/2i http://birkkane.com/2w1/b http://nhroiv.com/wd4/2g http://ouvthweg.com/x7z/2u http://vwsevihm.com/xs1/v http://jmgm
7
2649
Rodney FlynnGene Flowers(924)305-7001http://ouvthweg.com/qm8/40 http://vwsevihm.com/q http://jmgmypium.com/3ms/2p http://birkkane.com/dfu/26 http://nhroiv.com/hj6/c http://ouvthweg.com/7oh/2p http://vwsevihm.com/6az/1k http://jmgmypium.com/3s http://birkkane.com/zg1/5 http://nh
8
2653
AwkjolybAwkjolybaQuecSIjjRQnVleIt's serious <a href=" http://www.asteriskmotherboards.com//viewtopic.php?f=16&t=3809 ">nymphets young nymphets</a> :[ <a href=" http://www.austinmischief.com//viewtopic.php?f=1&t=21161 ">modload</a> 886 <a href=" http://www.iphone-converter-soft.c
9
2651
Ruthie RowlandLonnie Duke(373)540-8375http://ouvthweg.com/rj8/1o http://jmgmypium.com/o2f/28 http://vwsevihm.com/5vo/3k http://nhroiv.com/wd4/s http://birkkane.com/zgo/4q http://ouvthweg.com/rj8/0 http://jmgmypium.com/r7y/16 http://vwsevihm.com/4p http://nhroiv.com/6g3/2y http:/
10
2630
Erika RatliffKendrick Gutierrez(339)280-2164http://nhroiv.com/6b3/47 http://jmgmypium.com/6sp/2p http://ouvthweg.com/x7z/2e http://vwsevihm.com/idg/48 http://birkkane.com/zg1/1s http://nhroiv.com/sgj/2o http://jmgmypium.com/20 http://ouvthweg.com/k4b/34 http://vwsevihm.com/qe8/1j http
(E) Edit Record     
(e)productid  
(e)prodname
(e)custname
(e)telephone
(e)address1
(e)address2
(e)Complaint
 
  PHPLens (Page 1)  
E Nxt End New Srch

Notes

This feature is available since 3.1.

This demo show to create complaint records, retrieving the product id and product name using a search form built into the NEW/EDIT record form. This is particularly useful when we have a 100,000 product table and we don't want to pull every product record in a normal lookup, but allow the user to enter the first few characters of the product name, then we perform a search.

The key property is:

$lens->searchInEditNew = 
"PRODNAME^select concat(productname,' (',productid,')'),productname,productid,productid 
	from products where productname like '{#}%'^prodname^productid^>1";
		

There are two modes for searchInEditNew. The first is when no lookupLens is defined as in this example. The second is discussed in ex920.

The searchInEditNew generates the search field. The key to understanding this is the prodname^productid list above, which defines the fields that receive searched values.

Now look at the SQL SELECT statement. The {#} in the SQL is substituted with what the user entered in the input field.

The SQL statement retrieves 3 fields, the first being what we show the end-user in the popup.

The 2nd is what we store in the prodname, the first field of the list prodname^productid.

The 3rd field of the SQL is stored in productlist, the second field of the list prodname^productid.

Now if 3 items were defined in the above list, say prodname^productid^more3 then the SQL statement would have had 4 fields, the 4th field storing into more3.

The >1 in the property means the field requires at least 1 character before a search can occur.

Lastly, this example has the details being displayed below the grid, using $lens->showRecNo = 5;

email: contact#phplens.com (change # to @)     telephone (malaysia): 60-3-7947 2888     fax (malaysia): 60-3-7947 2800