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
70910
freelovefreelove31990419381In tens, please (ten pound notes) <a href=" http://www.findagroomer.com/pet-owner-help.htm ">september cabinet cheapest xenical orlistat appears bait</a> District clinics that serve rural Africa are not close enough to most villages to get the treat
2
70914
JackJack47253927242I'd like some euros <a href=" http://5passion.com/contact.htm ">diflucan online no prescription</a> Carney dedicated much of his speech to explaining why the central bank believed unemployment would fall only slowly, pointing to expected further job
3
70920
OwenOwen84774206651I'll put her on http://rawmatroid.net/faqs/ buy avapro The findings revealed that people with an MDS of over 6 were 12 percent less likely to develop diabetes than those with the lowest MDS of 3 or under. However, participants with the highest avail
4
70923
JeremiahJeremiah61931391240I'd like to open a personal account <a href=" http://www.leerowingclub.com/club-location ">zyban mechanism f actin</a> The SEC's case, as summed up by U.S. District Judge Katherine Forrest last month, is that Tourre "handed Little Red Riding Hood an
5
70926
KevinKevin84835562372I do some voluntary work <a href=" http://www.leerowingclub.com/club-location ">zyban on line</a> The Broncos defense, now halfway through Von Miller's suspension and playing again without injured Champ Bailey (foot), allowed only 9 yards on the gro
6
70928
EvaEva12770156599History <a href=" http://www.cedenpa.org.br/Noticias ">Norethindrone Acetate Tablets</a> Fey and Poehler faced off on the big screen in the 2008 film "Baby Mama." In it, Fey played a type-A single wanna-be mother and Poehler her irresponsible surrog
7
70931
KaylaKayla66706761949I work here <a href=" http://www.leerowingclub.com/club-location ">zyban generic brand</a> HONG KONG, Oct 16 (Reuters) - China shares underperformedothers in Asia, pushing down Hong Kong markets, and could havetheir heaviest loss in three weeks on W
8
70939
HannahHannah39381209721I'm doing an internship <a href=" http://www.jubileusul.org.br/nota/833 ">buy benoquin cream sz</a> A Home Office spokesperson said:"We are taking proactive steps to contact individuals who records show have no valid right to be in the UK, some of w
9
70942
JustinJustin85048443215How long have you lived here? <a href=" http://newenglandallergy.com/pollen ">diflucan tablet</a> Aug. 12, 2013 - BlackBerry says it is weighing options includinga sale. Fairfax Financial Holdings' Prem Watsa steps down fromboard to avoid conflict o
10
70943
LuisLuis33957661397What qualifications have you got? <a href=" http://www.leerowingclub.com/club-location ">get zyban</a> LONDON/PARIS, Sept 30 (Reuters) - Hedge funds' negative betson European shares have tumbled to a level not seen since beforethe global financial c
(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