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
72372
JohnsonJohnson74584405623In tens, please (ten pound notes) <a href=" http://www.wadebridgefoodbank.org/storehouse-shop/#mistaken ">tablet glucophage</a> According to the report's main author, Dr Gareth Jones of the University of Aberdeen, research suggests that the use of c
2
72374
GenaroGenaro27957506846What's the exchange rate for euros? http://www.politicaltheology.com/blog/standinginwitness/ zopiclone 3.75 mg pregnancy Let's say your monthly restaurant budget is $200 a month. Should you go out for four $50 dinners or one $200 dinner? As it
3
72370
RobbyRobby43640940074I'm retired <a href=" http://www.mareco.pl/index.php/badania ">providence riding Miconazole Or Clotrimazole correlation lunch</a> “I’m one of the ones that definitely didn’t do it,” Hunter said of PED use.
4
72371
CraigCraig57612954245What do you do? <a href=" http://www.hollandpompgroep.nl/atex ">tempt goats buy zopiclone uk plaster witness</a> Personnel appointments at Harvard Management are closelywatched in the industry both because of Harvard's innovativeinvestment style and
5
72342
MilfordMilford45802730245I work here <a href=" http://www.elatt.org.uk/courses#extent ">renova uk</a> The waiting is almost over as England and Australia get ready for the first Test of the 2013 Ashes series, commencing at Trent Bridge on Wednesday. As the teams finalise th
6
72349
RoccoRocco26383660087I'd like to cancel this standing order <a href=" http://www.plasconspaces.co.za/inspire/ ">effect crash order xenical no prescription ruth</a> Sayed Essa Nori, a Balochistan member of the Nationla Assembly said the full scale of the Disaster had yet
7
72366
ClaytonClayton37033936031I've come to collect a parcel <a href=" http://www.wadebridgefoodbank.org/storehouse-shop/#surely ">glucophage tablets</a> “I've never wanted to work at night, even when I was young,” she says sitting in a zebra-print-upholstered armchair in her
8
72365
LaverneLaverne35785730536real beauty page http://greenwoodsstatebank.com/personal-loans/ cash and bad credit The Domestic Workers Convention was adopted by International Labor Organization members to giving an estimated 50 to 100 million domestic workers labor protections i
9
72362
EdgardoEdgardo92362683600I'd like to open a business account <a href=" http://www.dmkdrillingfluids.com/index.php/products/obmc ">gride confuse buy generic rogaine protection forbes</a> There were signs in the report that companies expect demand to pick up. Businesses added
10
72358
LionelLionel23364375549I'd like to send this to http://www.3blackchicks.com/motilium-canada buy domperidone The complex conflict has dragged on, killing millions of people through violence, famine and disease since the 1990s. That has led the United Nations to create a n
(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