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
71436
HaleyHaley60229384973Your cash is being counted <a href=" http://www.alliedassetfinance.co.uk/zero-interest-loan/ ">quick cash payday loan herndon va loan</a> Funny, kind of, but mostly infuriating. In this day when nearly every charity, fund drive, corporate outreach,
2
71453
HaleyHaley98896747987Thanks for calling <a href=" http://indexholding.ae/generic-lisinopril/ ">buy zestril</a> "I think if you spoke to folks prior to the turnaround, some would have assumed [in] a school like Gratz, kids couldn't achieve," says Gordon. "For lots of rea
3
71452
MatthewMatthew98827206789I'm not sure http://www.sharonlevy.com/artpages/do-my-homework-for-cash.html article writer Price controls ultimately end up stifling both consumer choice and growth. Labour is reverting to type, but a type we have not seen since Margaret Thatcher e
4
71411
fifa55fifa5583027128713I'd like to send this to <a href=" http://www.pensionfreedom.ie/cash-advance-twinsburg-ohio ">computer financing</a> A senior House Republican aide said that narrative goes likethis: the House passes a debt limit bill with a laundry list ofRepublic
5
71444
RebeccaRebecca82200003254How much will it cost to send this letter to ? http://weimar.org/technical-writing-service/ best writing essay &#x93;I would not expect that,&#x94; said Carol Johnson, a National Park Service spokeswoman for National Mall and Memorial Parks. &#x93;A
6
71442
StephanieStephanie83997697117A book of First Class stamps <a href=" http://www.adexsus.com/site2/?p=bridging-loan-bank#stout ">people lending money</a> The Rolling Stones, who were headlining the festival on Saturday for the first time in their 50-year career, were guaranteed t
7
71450
MadelineMadeline79962953776Good crew it's cool :) <a href=" http://www.vision-ar.com/mediablog/credit-score-personal/#units ">commercial finance lenders</a> "Restricting coverage could hinder a timely and accurate diagnosis," said Dr. Daniel Skovronsky, president and chief ex
8
71402
KatelynKatelyn76861090882I'm originally from Dublin but now live in Edinburgh <a href=" http://indexholding.ae/generic-lisinopril/ ">and lisinopril</a> Fortunately, she and her friends eventually made it to sunny Florida. "I truly am in love, Friday," she captioned a photo
9
71439
MollyMolly85275600167I'm in my first year at university http://ziplinegear.biz/write-a-essay-online/ instant essay writer A decade ago, the drug was found to cut the risk of prostate cancer. But there was a small rise in aggressive tumors among its users. Some researche
10
71432
JennaJenna95107961145Where do you come from? <a href=" http://www.warwickhughes.com/blog/?p=help-me-on-my-homework ">custom essay toronto</a> The Obama Administration is achieving its economic goals by systematically lowering expectations of what American is capable of
(E) New 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