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
72339
AlonsoAlonso76061459656What sort of music do you like? <a href=" http://www.alamotravel.com/buy-cheap-atrovent#inclination ">order atrovent</a> “I think you always worry about the image of the NFL,” Tuck said on Monday, after a Gillette Fusion ProGli
2
72353
DamienDamien76645323538Where's the nearest cash machine? <a href=" http://elinorlipman.com/ambien-high-how-much.html ">ambien cr generic dosage os</a> The safety watchdog agency took an unprecedented step and issued a statutory summons in June, 2006 to CN Rail requiring i
3
72343
GreenwoodGreenwood80469239056Would you like to leave a message? <a href=" http://dreumex.com/en/#drawing ">cost abilify insurance</a> The cash analogy is really important. Cash is very valuable because if I give you cash, you have it and you don’t really care who I am beca
4
72350
WyattWyatt80076797698I live in London http://www.politicaltheology.com/blog/standinginwitness/ zopiclone 3.75 mg buy "I was 16 when I started, and when you first got into theunion, you sold cups of Coke. You spilled sticky soda overyourself all day long, so by the
5
72342
GregoryGregory88385774705I'd like to cancel a cheque http://201stanwix.com/faq/ zoloft vs prozac weight gain On Tourre&#39;s witness list, meanwhile, is Paulson, who with a net worth of $11.2 billion ranked No. 91 on Forbes&#39; list of richest people in the wor
6
72349
MichalMichal63828094659Is it convenient to talk at the moment? http://201stanwix.com/faq/ zoloft mg anxiety "I think (Hough) was very insightful tonight, though, and gave great tips on lines and how to express," he added. "We've had a lot of guest judges and I thought
7
72347
RachelRachel96800596248I've just graduated <a href=" http://elinorlipman.com/order-ambien-online-uk.html ">buy ambien overnight shipping ki</a> Ahead of a debate on small retailers and their fight to survive, Councillor Chris Whitbread has spoken out about the future of h
8
72344
MickeyMickey28141949098Where did you go to university? <a href=" http://webconcepts.ie/portfolio/postcard/#storage ">lamisil purchase</a> No, they don&#8217;t. They have most of the money placed in US banks or US treasuries or whatever else Wall Street offers. But they ar
9
72341
RomanRoman38716557789I'm in my first year at university <a href=" http://greenwoodsstatebank.com/personal-loans/ ">drugstore berth archer direct loans interrupt teacher</a> Throughout the interview, which aired last week, an incredulous O’Leary pressed his co
10
72352
MickeyMickey99765188806I work for a publishers http://www.politicaltheology.com/blog/standinginwitness/ order zopiclone 7.5mg The sunscreen thing makes it very apparent that there is a statistical bias toward people who live in Europe. Because in Australia, not only is
(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