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
70953
HaydenHayden61196427308I'm sorry, I'm not interested http://www.pharmatory.com/quality/ ritemed amlodipine price philippines So perhaps it's no surprise that established companies like the Weather Company (formerly the Weather Channel) have made millions on their wea
2
71016
freelovefreelove41660747680We'd like to offer you the job <a href=" http://www.perspicalia.com/fuckowski#tones ">how often to take 200 mg celebrex</a> Elsewhere, the report found that less than half of forces complied with the requirements of the code to make arrangements for
3
71010
TylerTyler80809314181Wonderfull great site http://www.videogameconsolelibrary.com/blog/?p=eassy-writing homework help websites high school Saudi Arabia's royal family and many ordinary Saudis have tribal ties with Syrians. Saudi Arabia has sought to contain the regional
4
71019
EmmaEmma13065989649When can you start? <a href=" http://www.perspicalia.com/fuckowski#taxi ">celebrex capsules 200 mg used</a> I have had very little time employed with corporate life and have spent most of my life as a small businessperson. But while working for one
5
71012
ZoeyZoey43946263416I live here http://www.optimum.ie/momentum/prism buy albenza The &#8220;couple&#8221; was moved up the stairs of the hospital and a crowd quickly mobilized, rushing towards the entrance. &#8220;Kate&#8221; and &#8220;William&#8221; paused at the doo
6
71004
EllaElla56333062320Not in at the moment <a href=" http://www.charmaine-yee.com/info/press/ ">intentional contain where can you buy flagyl over the counter pit</a> But mayoral hopeful John Liu, who wants to end stop-and-frisk, disagreed with the mayor's methods. "We ca
7
70964
KatherineKatherine67224176155I'm on holiday <a href=" http://www.aismglobal.org/index.php/about/vision-mission ">imitrex 25 mg cost ab</a> "Our national security and military leaders have concludedthat the risk of keeping Guantanamo open far outweighs the riskof closing it beca
8
71024
IsaacIsaac58592251449I'm from England <a href=" http://www.volunteerglasgow.org/volunteer/ ">buy cheap remeron</a> It reflects the growing capabilities of the Pakistani branch of the Taliban, an offshoot of the insurgents of the same name in neighboring Afghanistan, to
9
71006
JosephJoseph88931216577A packet of envelopes <a href=" http://bikinginbarcelona.net/cash-loan-installment-18-years-or-older/ ">payday advance installment loans</a> Earlier this week, Rep. Frank Wolf, R-Va., along with Frank Gaffney, Jr., president and CEO of the Center fo
(E) Edit Record     
(e)productid 40 
(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