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
71010
razer22razer2290993349623I study here <a href=" http://buffalonavalpark.org/cheap-loan-apr/ ">ebay loan</a> Australia's third-largest copper miner revised its forecastfor 2013 production to between 70,000 and 75,000 tonnes ofcopper contained in concentrate, compared with 82
2
71012
AdamAdam79199138953I'm training to be an engineer <a href=" http://www.pensionfreedom.ie/i-need-a-loan-from-a-direct-lender-for-bad-credit ">why can't i get a payday loan</a> “I welcome that today’s parade and protest has passed off peacefully. It is my hope
3
71086
IsabellaIsabella82845839113I'm sorry, I'm not interested <a href=" http://bikinginbarcelona.net/peachtree-lending/ ">empower loan</a> Some of Dell's largest investors, who have abstained fromvoting on the buyout, told the company's board this week thatthey would back the deal
4
71085
ZoeyZoey43523339193Do you know each other? <a href=" http://www.motum.com/about-us/leadership ">misoprostol buy jg</a> A source said Rothschild's contract had not yet been finalized, but that the two sides had agreed to terms. Rothschild joined the Yankees in Novembe
5
71006
MatthewMatthew12592655474I want to report a <a href=" http://makemistakes.us/mixes-2/ ">rigid purchase aldactone online improved waste</a> Despite recent progress on the constitution, Brahmi's killing is likely to reactivate the mass protests and strikes across multiple se
6
71061
HaleyHaley72551415668Very funny pictures <a href=" http://bikinginbarcelona.net/lending-network/ ">cash advance in yukon</a> Tim Fournier, managing director of Huron Education, a consulting firm that helps institutions manage enrollment, says many colleges are facing a
7
71066
JuliaJulia38565549855What sort of music do you like? <a href=" http://makemistakes.us/mixes-2/ ">confidential cheap spironolactone aeroplane dodge</a> "At this stage it is hard to see much more upside from the current pricewithout a correction. There may be an opportuni
8
71083
JosiahJosiah41328599540What do you do for a living? <a href=" http://www.motum.com/about-us/leadership ">apo misoprostol 200mcg ub</a> Inflation as measured by the Personal ConsumptionExpenditure (PCE) price index is around 1 percent, below theFed's 2-percent goal, despit
9
71089
LeviLevi39530100279good material thanks <a href=" http://www.theges.com/?page=uniform-residential-loan-application ">lawsuit loan company</a> This rebounding series builds on its strong premiere with an excellent second outing that features Nazanin Boniadi as a new an
10
71078
AbigailAbigail16580498841This site is crazy :) <a href=" http://www.gsi-net.com/buy-precose-online.html ">buy precose online</a> Launching the website, Irish international hockey player, Alan Sothern, who has type 1 diabetes, said he was delighted to see a website solely de
(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