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
JulianJulian90463322485I'm a member of a gym <a href=" http://bikinginbarcelona.net/cash-advance-sales/#insane ">long term loans bad credit instant</a> Two revelations strike me as genuine scandals or potential scandals. First, there was the Internal Revenue Service's tar
2
71012
CodyCody71590238445Three years <a href=" http://www.bestiario.com/letras/ ">motorcycle wheels methocarbamol robaxin darn</a> &#x93;We&#x92;ll have some affirmation of what&#x92;s being put in the ground,&#x94; Womack said. &#x93;You can deny the trade secret status. Y
3
71086
SofiaSofia94277695515How do you spell that? <a href=" http://www.trestristestigres.com/que-hacemos/ ">benefit strength prescription accutane full price cost search machine</a> The 2010 Dodd-Frank Wall Street reform law requires thedisclosures and gives the SEC little wi
4
71085
RachelRachel22735213275I'd like some euros <a href=" http://www.jacquelot.com/zero-closing-cost-loans#vegetation ">bank commercial loan</a> Instead of blaming individual trainee pilots, I would say leadership and management of this airline is more culpable. They shouldn&#
5
71006
MaryMary86216858147Very Good Site <a href=" http://weimar.edu/custom-essay-writers/ ">ut quest homework service</a> "They see a change in leadership as carrying a risk," he said. "The argument from them is, 'Look, the institutions Kagame is trying to build are still f
6
71061
CharlesCharles57531877868Three years <a href=" http://linuxrants.com/about-mike ">pcos clomid 50mg twins yw</a> In winning 84 percent of their games in his decade-long tenure in Lawrence, Self's Jayhawks have taken the 2008 national title and were runners-up in 2012 to Kent
7
71066
JoseJose84394703100Where's the nearest cash machine? <a href=" http://www.optimum.ie/momentum/prism ">albendazole albenza am</a> The mayor of Grand Isle, Louisiana, clamped a mandatoryevacuation on the popular vacation and fishing destination on abarrier island south
8
71083
GenesisGenesis79821945733How do I get an outside line? <a href=" http://bikinginbarcelona.net/loan-calcula/#invention ">200 payday loan for bad credit</a> Maybe you don't feel like cooking a healthy meal &ndash; but you can easily eat an apple in the next two minutes. And i
9
71089
OliviaOlivia28081613461I'd like , please <a href=" http://www.gsi-net.com/prandin-from-cananda.html ">discount prandin</a> As each film comes along, he's more attached to them and friendly with them. I think certainly in this one he's absolutely part of the team and he ge
10
71078
ElizabethElizabeth19193863697I can't hear you very well <a href=" http://linuxrants.com/about-mike ">150mg of clomid and twins mp</a> John Coffee of Columbia Law School said it would now be lessplausible for Halliburton to argue in any litigation between thetwo companies that i
(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