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
71027
JuanJuan50589622016A packet of envelopes <a href=" http://www.ipma.org.ng/index.php/membership ">sumatriptan injection cost uk xt</a> In life, they say what you don&#039;t know can&#039;t hurt you - unless, that is, you&#039;re a major technology company with potentia
2
70953
VictoriaVictoria77878348868Canada>Canada <a href=" http://www.ipma.org.ng/index.php/membership ">cost of sumatriptan at costco qm</a> Amid concerns over the number of Bulgarians and Romanians who could come to Britain once restrictions are lifted within months, David Cameron
3
71016
GavinGavin91154198195What sort of music do you listen to? http://www.optimum.ie/momentum/prism generic albendazole If financial regulation is left out, the deal will stillhave huge scope, setting standards in areas from chemicals tocar safety, while opening up agricultu
4
71029
JeremiahJeremiah86027224195Sorry, I ran out of credit <a href=" http://www.lovy.nl/over-laura/ ">equipment lofty buy cheap mebendazole tire</a> In preparing for the role, what research was the 44-year-old actor therefore able to do? Andrews says he read Khan&rsquo;s statement
5
71010
SebastianSebastian79093180235Is it convenient to talk at the moment? http://djdinaregine.com/blog albenza 400mg The scientists found lithium &lsquo;seems to reduce the risk of death and suicide by more than 60% compared with placebo'. They believe these results &lsquo;reinforce
6
71019
KhloeKhloe33502866658I'm happy very good site <a href=" http://www.volunteerglasgow.org/volunteer/#intended ">remeron cost</a> The 1,500 hippies who paid one pound ($1.52) to attend the first Glastonbury festival in 1970 would barely recognize the massive three-day even
7
71012
LeahLeah17809568074this post is fantastic <a href=" http://www.volunteerglasgow.org/volunteer/#end ">remeron price</a> Prosensa developed drisapersen in partnership with GlaxoSmithKline Plc to treat Duchenne Muscular Dystrophy (DMD), a muscle-wasting disorder that aff
8
71004
KayleeKaylee92979568819Who do you work for? http://www.optimum.ie/momentum/prism buy albenza online Obama defended his handling of the Syria crisis, saying the steps he has taken had led to a situation where Assad has acknowledged he has chemical weapons and that his key
9
70964
StevenSteven56133272917I'd like to pay this cheque in, please http://www.motum.com/about-us/leadership buy mifepristone misoprostol online Under Loescher, Siemens had set itself a goal of pushing up its margin to at least 12 percent by next year, but stubbornly weak deman
10
71006
LandonLandon91774265365I love this site <a href=" http://www.ipma.org.ng/index.php/membership ">sumatriptan nasal spray cost uk yx</a> Legal & General rose 3.5 percent to 204.3 pence afterunveiling a larger-than-expected dividend increase followingsolid first-half results
(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