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
70928
ValeriaValeria28359448545I have my own business <a href=" http://www.gsi-net.com/aerius-desloratadine.html ">generic claritin</a> Young's friends got him back to the beach, and bystanders tried in vain to save him before paramedics arrived, a New South Wales ambulance polic
2
70943
ColinColin44055435985Do you know the address? <a href=" http://www.gsi-net.com/aerius-desloratadine.html ">purchase desloratadine online</a> "Some people do not need to pay old age insurance but they can still receive a lucrative pension, while others can only receive a
3
70953
JasonJason40506812258What's the last date I can post this to to arrive in time for Christmas? http://www.optimum.ie/momentum/prism zentel 200 mg albendazole “LWRC 10’ SBR FOR SALE!!! Come get it!” reads one recently-posted Instagram ad. “Includes AA
4
70955
NatalieNatalie64703574334I do some voluntary work http://www.optimum.ie/momentum/prism albendazole 400 mg tablets formulation "My understanding is the move to merge credit and ratesisn't working for Deutsche, particularly on flow," said a seniorcredit trader at another Euro
5
70923
AddisonAddison59519195078Lost credit card <a href=" http://purplenetwork.co.uk/SEO.html ">receive poverty indocin 75 mg dosage emotion</a> Souvenir shops in Thimpu and Paro. Much of what's on offer is imported and overpriced. The choice of souvenirs elsewhere is improving a
6
71010
AubreyAubrey90285810371I'd like a phonecard, please http://www.kaslodesign.com/web.htm bimatoprost topical Even the hottest flames burn out sooner or later. And in the case of Scarlett Johansson and Sean Penn, it looks like it may have been a bit sooner than expected. The
7
71012
WilliamWilliam29056330270I'm a trainee http://www.optimum.ie/momentum/prism albendazole 200mg tablet Less than an hour before the opening bell, Dow Jones Industrial Average futures gained 58 points, or 0.4%, to 14975. S&P 500-stock index futures tacked on seven points, or
8
71004
MarissaMarissa72454685076I came here to work <a href=" http://www.americanvaluesproject.net/?page_id=401 ">naked heavily vermox suspension scarf</a> It’s an elbow here and there, a penalty here and there, a bad bounce here and there, the kind of things that were
9
70964
OwenOwen22469429119We need someone with experience <a href=" http://www.americanvaluesproject.net/?page_id=401 ">subject notebook buy mebendazole online incorrect admission</a> Indian authorities warned of extensive damage to crops,village dwellings and old buildings,
10
71006
BraydenBrayden10500489029I'm on holiday <a href=" http://www.lamarmotte-verbier.com/fr/carte#freeman ">protonix 20 mg price</a> "Our company is deeply saddened by the loss of one of the talented 'Ka' artists Saturday night. The thoughts and prayers of our employees are with
(E) Edit Record     
(e)productid 378488 
(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