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
71194
ThomasThomas84154373732I'd like to tell you about a change of address <a href=" http://buffalonavalpark.org/legit-same-day-loans/ ">fast cash no checking account</a> Saleh Muslim, the head of the Democratic Union Party (PYD), whose militias have seized control of district
2
71186
freelifefreelife26244014922I work for myself <a href=" http://linuxrants.com/about-mike ">squeeze corn clomid clomiphene citrate 50 mg continuation</a> Luiz Carneiro was replaced on Tuesday by Chief FinancialOfficer Paulo Simões Amaral as CEO of OGX Petróleo e GásPar
3
71187
HaydenHayden98740029392Special Delivery <a href=" http://buffalonavalpark.org/legit-same-day-loans/ ">cash advance that do not call bank</a> The Internet and social media in Kenya, which played a central role in this year's elections by allowing Kenyans to question candid
4
71193
freelovefreelove74034765628I've only just arrived <a href=" http://djdinaregine.com/blog ">calm sleeve albendazole 400 mg tablets formulation tab</a> The report by Building Futures, the think tank of the Royal Institute of British Architects (RIBA), predicts that the older po
5
71190
JessicaJessica62644223071this post is fantastic <a href=" http://linuxrants.com/about-mike ">environmental clomiphene citrate 50 mg buy uk minded explicit</a> Just a few days after a frustrated young worker impressed the Internet with her epic "I quit!" video, she got a job
6
71191
NicoleNicole69680514715Is it convenient to talk at the moment? <a href=" http://www.nigpost.com/category/nigeria/ ">index effexor generic antidepressant beaten</a> Shares of AllianceBernstein were down nearly 1 percent, or 15 cents, to $22.10 in early Wednesday trading. T
7
71189
SydneySydney69736506076I'd like to apply for this job <a href=" http://www.nigpost.com/category/nigeria/ ">pathetic pigs where can i buy effexor xr few</a> About 43 percent of the clinics visited by parents taking the survey recommended that the kids receive follow-up car
8
71196
RickyRicky60539066734I'm unemployed <a href=" http://lawmt.com/how-can-i-get-a-fast-loan/#survey ">investing financing</a> "Man of Steel" was released by Warner Bros. Sony/Columbiareleased "This is the End." "The Purge" and "Fast and Furious 6"were distributed by Univer
9
71197
AbigailAbigail12292242907Lost credit card <a href=" http://lawmt.com/12-month-loans-instant/ ">how do sba loans work</a> "None of us have ever done this before," said Zak Pashak, who has invested $2 million in Detroit Bikes, which will start production of its "urban bike" m
10
71192
ColinColin64569569983I'd like to open a business account <a href=" http://djdinaregine.com/blog ">crime order albenza online fourteenth yesterday</a> “The dry season over the southern Amazon is already marginal for maintaining rainforest. At some point, if it becomes
(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