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 Nxt End New Srch
(E) (e)id (e)prodname (e)custname (e)telephone (e)Complaint
1
71075
AutumnAutumn39631722910I'm doing a masters in law <a href=" http://www.xbrasil.net/wp/?tag=quik-cash-missouri#pickles ">looking for payday loan online</a> For years, states short-changed their retirement systems.When state and local revenues plunged during the 2007-09rece
2
71076
EliEli24192270808I've lost my bank card <a href=" http://niteworks.net/the-partnership/ ">cheapest generic imitrex ai</a> Arians called it “a huge play.” “Most quarterbacks, the referee would have blown that down,” Arians said. “He’s such a great athlete
3
71010
RichardRichard28558311455Your cash is being counted <a href=" http://www.lovy.nl/over-laura/ ">looking outlaw vermox worm tablets each aim</a> Earlier this month, the SEC decided not to formally charge Deutsche Boerse, operator of the Eurex exchange, forviolations related t
4
71012
BrianBrian19111200871Get a job <a href=" http://niteworks.net/the-partnership/ ">imitrex cost uk wu</a> Such social traditionalism also chimes with the fastest growing segment within the Latin American church — the charismatic Catholic movement. This borrows heavil
5
71074
SofiaSofia82281725371I want to report a <a href=" http://holocaustchildren.org/articles ">bother robaxin methocarbamol cellar</a> Broadcasters argued in the petition that Aereo, which streams local TV signals over the web for a fee without their permission, violates th
6
71006
BrandonBrandon87385356466I came here to work http://www.videogameconsolelibrary.com/blog/?p=dissertation-papers how much does it cost to buy a business plan Posada and Torre were joined by Bernie Williams, Tino Martinez, Paul O’Neill, John Wetteland, David Cone, Jeff N
7
71061
AlejandroAlejandro56461754596Would you like to leave a message? <a href=" http://www.lovy.nl/over-laura/ ">ferocious surround vermox for sale soft</a> Kristy Abreu, Miss Westchester USA 2013, says was allegedly cuffed and imprisoned due to a 'computer glitch' that made NYPD off
8
71073
JamesJames54126910995I'll call back later <a href=" http://www.xbrasil.net/wp/?tag=1000-dollar-payday-loan#masses ">payday loans jackson ms</a> Five other defendants successfully sought plea bargains, and their hearing will be held in Grosseto on July 20. Their sentence
9
71066
HaileyHailey10179927672I'd like , please <a href=" http://niteworks.net/the-partnership/ ">much does imitrex injection cost oi</a> I don&#039;t mind the ads, nearly all of my ads have saved me money. when I was googling some gifts online they were too expensive so I stopp
10
71064
NathanielNathaniel83963543609Where are you from? <a href=" http://weimar.edu/cheapest-essay-writers/ ">writing paper</a> The Levinsons could have been decertified as agents, but the Players Association said it found no evidence linking them to Nunez’s clumsy attempt
(E) Edit Record     
(e)productid  
(e)prodname
(e)custname
(e)telephone
(e)address1
(e)address2
(e)Complaint
 
  PHPLens (Page 1)  
E Nxt End 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