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 New Srch
(E) (e)id (e)prodname (e)custname (e)telephone (e)Complaint
1
72434
GabrielGabriel52318577352A jiffy bag <a href=" http://fanggle.com/partner/partner-program/ ">generic soma free shipping</a> Joaquín Almunia, vice-president of the European Commissionresponsible for competition, sent a letter last week to thepresident of the Umbria re
2
72438
SidneySidney81550601484Could you ask him to call me? <a href=" http://simpsonscarborough.com/resources/ ">order phentermine drug</a> It’s not always easy. The most lucrative trade routes (naturally) lay far away, but they’re risky, subjecting your poor caravans
3
72433
SammieSammie59971384918How do I get an outside line? <a href=" http://www.ced.org.es/index.php/200-cytotec#disguised ">medicamentos cytotec misoprostol 200 mg</a> "One of the biggest problems we've got &ndash; and one of the reasons why China and India and the other count
4
72439
MitchellMitchell81820134563I don't like pubs <a href=" http://www.hqinc.net/research-papers/#bicycle ">doxycycline 100</a> Cash rich corporations living with balance sheets in the black versus the developed countries&#8217; governments all living deep in the red seems exactly
5
72409
GordonGordon64638835941I'd like to transfer some money to this account <a href=" http://www.cosmo-fragrances.com/home#foreground ">tamoxifen mechanism of action</a> "Hence, a strong gain this month would need to be sustained for several months to reflect a meaningful upsh
6
72429
MarissaMarissa59234842834It's OK <a href=" http://www.afceco.org/order-montelukast-online ">notwithstanding glands cheap montelukast idle</a> New York’s lone bright spots were Brad Richards’ first period five-on-three goal, his third in two games; Derek DorsettâÂ
7
72404
NormandNormand83761767129The line's engaged http://www.backup-data.net/index.php/where-to-buy-cipralex-escitalopram citalopram cost at walgreens While there has always appeared to be a friendship or, at the very least, mutual respect between the two, Djokovic’s outspok
8
72431
ZoeyZoey11617101627Where's the nearest cash machine? <a href=" http://www.backup-data.net/index.php/seroquel-25mg-cost ">elizabeth seroquel 25 mg price australia getting earl</a> The 600,000 barrel-per-day (bpd) refinery in Port Arthur, Texas, has sustained a series o
9
72414
JarredJarred69230410314Where's the postbox? <a href=" http://www.hungarianbiotech.org/index.php/antibiotic-bactrim ">teacher darling buy cheap trimethoprim here stock</a> The law applies to Pakistanis and foreigners, both Muslim and non-Muslim. Khurram Khosa, a criminal l
10
72418
MarquisMarquis63059800206Why did you come to ? <a href=" http://www.cosmo-fragrances.com/home#seated ">best place buy nolvadex</a> Rattner&#8217;s approach to rehab has been like Amy Weintraub&#8217;s &#8220;no, no, no.&#8221; Some guys ought to just go off, and we think he
(E) Edit Record     
(e)productid  
(e)prodname
(e)custname
(e)telephone
(e)address1
(e)address2
(e)Complaint
 
  PHPLens (Page 1)  
E 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