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
72472
HaywoodHaywood78700517435Could you ask her to call me? <a href=" http://www.afceco.org/order-geodon#blonde ">buy geodon online</a> Additionally, the legislation maintains students' ability to consolidate their loans upon graduation and lock in a low fixed interest rate for
2
72467
BrockBrock49837849587A pension scheme <a href=" http://www.afceco.org/buy-macrobid ">macrobid vs cipro</a> It is trying to halt payouts, at least temporarily, complaining that Juneau's payout formula is too generous, and that it has uncovered evidence of fraud and confl
3
72470
FreddieFreddie15137732126I can't get a signal <a href=" http://www.healthcmi.com/sitemap#monitor ">bimatoprost without prescription or membership</a> When I moved into Spring Cottage eight years ago I was faced with a bare garden and wanted to fill it as quickly as possible
4
72461
SolomonSolomon49654794640I support Manchester United <a href=" http://www.ncconstructionnews.com/about/ ">tram waist Purchase Artane Online personality</a> ** Private equity firm Hellman & Friedman LLC has clinched aroughly $4.4 billion deal to take over Hub International I
5
72460
JerrellJerrell63991264927I'm on a course at the moment <a href=" http://www.aitvm.org/aitvm.org/index.php/cheap-neurontin-gabapentin#authorize ">neurontin tablets supplied</a> Following the recent publication of the Arulkumaran review report into the case, Health Minister J
6
72462
MosesMoses52742375661perfect design thanks <a href=" http://www.afceco.org/order-geodon#grave ">buy ziprasidone online</a> Can China’s unmanned combat aerial vehicles end up rivaling their American and Israeli counterparts? If China sells to countries where I
7
72465
NorrisNorris81572651933I want to report a <a href=" http://www.ambassadordivers.com/order-trental.html ">pentoxifylline er</a> Now living in Birmingham and continuing her studies, she has become a powerful proponent of childhood education for girls and for boys too. On J
8
72471
KendrickKendrick55022407922I'd like to tell you about a change of address http://www.eden-patio.com/index.php/cheap-tadacip generic tadacip These results strongly suggest that long-term unemployment is at least partly self-fulfilling. Like patrons who avoid restaurants purely
9
72469
LowellLowell71186123111Free medical insurance <a href=" http://caribbean-airlines.com/index.php/rogaine-rebate-2012 ">cost rogaine canada</a> The &#8220;Come and Get It&#8221; beauty, who turns 21 on July 22, and Bieber split in late 2012 after dating for almost two ye
10
72466
NormandNormand46974328099Do you like it here? <a href=" http://www.healthcmi.com/sitemap ">leather order bimatoprost uk castle hive</a> Julie Chen spent all summer hosting 'Big Brother' while her baby bump grew and grew. But after giving birth to son Charlie Moonves on Sept
(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