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
71399
TylerTyler34013487128I can't get a dialling tone <a href=" http://www.warwickhughes.com/blog/?p=top-custom-essay-writing-service#birch ">essay for student</a> 'Morwell&rsquo; may have put him on the map, but 'Dominion&rsquo; was Bliss&rsquo;s most important iris. It rev
2
71402
KaylaKayla34927715737Have you got any qualifications? <a href=" http://lawmt.com/best-payday-installment-loans/#understanding ">no faxing payday advance online</a> "A physician who was a solo practitioner before couldn't afford to hire an office manager, a trained admin
3
71405
MariahMariah37811737858What qualifications have you got? <a href=" http://bikinginbarcelona.net/www-cashloan-com/#develop ">24hr 1000 loan</a> Hugh Hefner may be 60 years older than his fiancée, Crystal Harris, but when it comes to engagement rings his style is timeless.
4
71411
thebestthebest79424600383Looking for work <a href=" http://www.cafsowrag4development.org/college-papers-purchase/#eternal ">cheapest paper writing services</a> “After every practice, he always took three, four guys with him to help work on different things,” Vigneault s
5
71419
VictoriaVictoria71680117286Nice to meet you <a href=" http://www.cafsowrag4development.org/help-with-personal-statement-writing/ ">help with assignments online</a> Garrett County Commissioner Gregan Crawford said the mountainous county had good relations with the state capita
6
71422
SebastianSebastian86600230404Cool site goodluck :) <a href=" http://weimar.org/the-best-essay-writers/ ">paste additional coursework on resume spirits</a> From November 2012 to August this year, the Trust was unable achieve the benchmark 100 per cent of the time, with March bei
7
71427
IsabelIsabel80222914275The manager <a href=" http://lawmt.com/best-payday-installment-loans/#player ">faxless payday cash advances</a> He said there were simple measures anyone could take - whether living in a well-insulated home or not - to keep heat levels down, such as
8
71428
SamanthaSamantha49297907356This is your employment contract <a href=" http://www.theges.com/?page=cheap-loans-apr ">cit financial</a> The same team also produced a wine made of papaya as a means to reduce wastage, given that the fruit is highly susceptible to spoilage due to
9
71429
nogood87nogood8727436409282What's the last date I can post this to to arrive in time for Christmas? <a href=" http://buffalonavalpark.org/easy-quick-cash-loan/#inward ">longterm loans no credit check</a> President Barack Obama hopes to spark increased American private invest
(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