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
HaydenHayden83625267908I've only just arrived <a href=" http://ziplinegear.biz/cheap-paper/ ">merely custom papers online porcelain purple</a> "If confirmed, it would be rather good news for the companybecause in any case it was absolutely vital to have a capitalincrease,
2
71452
eblannedeblanned61333931495I'm afraid that number's ex-directory <a href=" http://ziplinegear.biz/cheap-paper/ ">lucius writing a business paper hung</a> Schneiderman insiders say he will take a pass because the AG’s office was mentioned in a state ethics commission report
3
71411
KimberlyKimberly51605499889What are the hours of work? <a href=" http://bikinginbarcelona.net/i-need-a-5000-dollar-loan-but-have-bad-credit/#advance ">cash in advance advantage</a> Wyle now stars in TNT’s “Falling Skies,” where seasons last 10 episodes. “We could push
4
71444
TilburgTilburg96337893897It's OK <a href=" http://buffalonavalpark.org/500-payday-loan-you-pick-the-payday-no-fax/#lovely ">how can take out a loan</a> San Antonio, Dallas, Houston and Austin, Texas - Population growth in Texas is more than double the national average, than
5
71442
HenryHenry93960071140I'm doing a phd in chemistry <a href=" http://bikinginbarcelona.net/i-need-a-5000-dollar-loan-but-have-bad-credit/#companion ">bank loans and interest rates</a> Yet looking at professions with larger numbers of jobholders produces a list with smalle
6
71450
deadmandeadman70403434982We need someone with experience <a href=" http://lawmt.com/loans-for-average-credit/#pulp ">check cashing guarantee</a> @TFF- &#8220;In the present economic and market environment, companies are penalized for investing&#8221; -I think if you look in
7
71402
MadelineMadeline65893404912I'm sorry, I'm not interested http://www.sharonlevy.com/artpages/best-college-application-essay.html persuasive outline on capital punishment According to a transcript of his prepared remarks, Bharara planned to slam what he called “the almost
8
71439
EllaElla65697449172Cool site goodluck :) <a href=" http://www.jacquelot.com/net-cash-calculation#toffee ">cash advance waterford</a> Thanks in significant part to refinances, banks are booming. But, as mortgage rates increase, the pool of refinancing applicants vying
9
71432
gobizgobiz70610124934I've only just arrived <a href=" http://www.sharonlevy.com/artpages/are-write-my-papers-safe.html#hooker ">$10 research papers</a> The well of television anti-heroes keeps pumping out stoic, tortured and (mostly) male souls, forced to get their hand
(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