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
70923
JustinJustin11703589136I quite like cooking <a href=" http://www.cornwallfoodanddrink.co.uk/cheapest-custom-writing/ ">woodlands homework</a> Morrisons has seen profits and market share dented by itslack of exposure to online grocery and local convenience storechannels wh
2
70955
NatalieNatalie38593022424I was born in Australia but grew up in England <a href=" http://www.coercioninpsychiatry.com/accessibility/ ">Acticin Price</a> Much was made of the home side&#039;s long injury list but there were still several big names on display in red and black
3
70962
LukeLuke47286042687I'll text you later <a href=" http://www.houseofmooshki.com/contact-us/ ">simplicity wellbutrin cost generic decay bedroom</a> Edwards employs hundreds of people at its Crawley head office and manufacturing facilities and is widely-held to be among
4
70951
JadenJaden80938659634I'm not interested in football http://failfunnies.com/michigan-porn-robbery-fail/ amoxicillin clavulanate augmentin 875 It was then in this latter career that I awoke one morning and felt the need for a break from the norm. The BBC was, at that time
5
70964
AntonioAntonio48146602389My battery's about to run out <a href=" http://www.kinoliit.ee/eaal#scrub ">online overnight shipping bimatoprost</a> Sofia Vergara has a new piece of jewelry! The Colombian beauty, who rang in her 40th birthday in July with a proposal from her on-a
6
70953
ZoeZoe86602327707Punk not dead <a href=" http://santafyme.com/buysildalis/ ">buy sildalis</a> The expansion, which capitalises on strong consumer trendsas well as Finland's high reputation for food safety and productquality, comes as Kesko has cut hundreds of jobs
7
70942
GabrielGabriel56858638712What do you do for a living? <a href=" http://www.coercioninpsychiatry.com/accessibility/ ">Buy Acticin Online</a> "Given the urgent economic challenges facing our nation, I urge the Senate to confirm Janet without delay," Obama said. "I am absolute
8
70928
ChristianChristian96505456758Where's the postbox? <a href=" http://www.coercioninpsychiatry.com/accessibility/ ">Purchase Acticin</a> Safeway expects a cash tax benefit of $400 million to $450million from exiting Chicago, which it can use to partly offsetthe cash tax expense on
9
70958
AvaAva44110460575Whereabouts in are you from? <a href=" http://mccallssf.com/venues/ ">tool fortune generic wellbutrin xl 300 brands stated</a> Six years ago, Islamists stormed his radio station andordered him to broadcast a call for Jihad against the governmentof
10
70943
NicoleNicole61927987275Which year are you in? <a href=" http://mccallssf.com/venues/ ">repaired defiance how can i get a prescription for wellbutrin thursday commission</a> Thomas Menino stumbled — as he often does — when discussing the Red Sox and the World Ser
(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