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
71402
GraceGrace64238358047Are you a student? <a href=" http://www.videogameconsolelibrary.com/blog/?p=where-do-i-buy-essay ">windy indication faslane case study safety sandwiches</a> "In this case, the ability of flame retardants to bind to and inhibit an enzyme that metabol
2
71411
LaylaLayla67365791712A company car <a href=" http://www.pensionfreedom.ie/hard-money-lenders-pa ">online loans deposited same day</a> "Chinese people are getting more picky as to where they want to go - they are interested in Europe, Canada, the States… and S
3
71432
NoahNoah50419942740Which team do you support? <a href=" http://www.pensionfreedom.ie/hard-money-lenders-pa ">government money for pregnant women</a> Last month, President Barack Obama for the first time alsooutlined a plan to revamp the government's role in housingfin
4
71436
JacobJacob99303887401I'm not interested in football <a href=" http://www.sharonlevy.com/artpages/do-your-essays-for-free.html#multiple ">application essay writing service</a> Syria tried to retake the Golan Heights during the 1973 Middle East war. Despite inflicting hea
5
71439
FaithFaith71621879211I came here to study <a href=" http://lawmt.com/instant-cash-sweepstakes/ ">loan online payday loan</a> Target-date funds assets grew by 20 percent during 2012 &ndash; rising to more than $500 billion from about $420 billion at the end of 2011 &ndas
6
71442
ColtonColton11557964021It's a bad line http://www.cafsowrag4development.org/writing-resumes-for-high-school-students/ hypothesis paper writing services Luckily for her, Gomez’s writer and producers have aped other stars’ tricks gamely enough to creat
7
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
8
71452
ChloeChloe27953951994I didn't go to university <a href=" http://www.jacquelot.com/bad-credit-installment-loans-in-ga#summary ">bad credit home loan</a> Theirs is a divided family, but for those who watched Andy Murray and his divorced parents embracing each other joyful
9
71453
JimmiJimmi43817313980I'll put her on http://www.cafsowrag4development.org/do-my-essay-for-1000/ buy term papers essays "This story could have been scripted for a Lifetime movie," said Jordan's best friend of 13 years, Justin Jones-Fosu, who is in theological school in M
10
71456
lightsoullightsoul66707984727I like watching football <a href=" http://www.videogameconsolelibrary.com/blog/?p=websites-to-do-your-homework ">digging uttered write my report for me do my homework for me cubic</a> “Before anything else you’re a cop,” he says. “But some g
(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