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 Nxt End New Srch
(E) (e)id (e)prodname (e)custname (e)telephone (e)Complaint
1
70990
RobertRobert53077857791About a year http://axcess-electric-bikes.co.uk/bike-hire phenergan dm Vice President Biden’s office has cited the government shutdown as the reason for cancelling his public schedule. But several Senate Republican aides said the lack of a rol
2
70965
JoshuaJoshua80799641993good material thanks http://axcess-electric-bikes.co.uk/bike-hire purchase phenergan The Wansbeck MP told the BBC Radio 4 Today programme: "I think the plan's been ill thought-through. I think everyone within the trade union movement is up for refor
3
70982
SofiaSofia75604933294Have you read any good books lately? <a href=" http://groovingourmets.com/online-ordering/ ">ray amitriptyline costochondritis features armies</a> Nordqvist crashed a 7-iron on the 175-yard 17th into the pin, then the hole, to give Europe its only w
4
70955
ValeriaValeria77917034067How many are there in a book? <a href=" http://www.stclementsschool.org/wish-list/ ">amoxicillin 500mg price philippines</a> Regardless of how much the melting permafrost will cost economically, other manifestations of climate change are already bei
5
70928
JasmineJasmine84661963995I didn't go to university <a href=" http://ihcm.ae/?page_id=23#cabinet ">Buy Nortriptyline</a> Wartsila said its order book has taken a hit from customersdelaying investments, but stronger profit still helped to liftits shares 2.7 percent to 32.79 e
6
70967
LilyLily52500897766I live in London <a href=" http://www.washfruit.com/warehouses ">canoe vow how much should nolvadex cost greater</a> In Albany, Daisy struggled with depression and attempted suicide twice, including one instance in which her brother found her on the
7
70989
AustinAustin73414310548I'm a partner in https://www.wesearchtogether.org/about.php where to buy infant diflucan "Because it&#039;s so mysterious we can&#039;t be sure that it&#039;s confined to a small narrow band of people - in fact we think that there&#039;s a very str
8
70923
JustinJustin89196545056I'm at Liverpool University http://axcess-electric-bikes.co.uk/bike-hire phenergan buy online Television pictures showed a somber-looking, clean-shaven Bo, whose hair looked like it was still dyed black, in the dock without handcuffs. He was wearing
9
70943
MiguelMiguel44007194347Just over two years <a href=" http://www.experimentalconversations.com/issue/spring-2013/ ">setting buy trazodone 50 mg daytime</a> PARIS, Sept 13 (Reuters) - Electricite de France (EDF) is under no pressure to sell assets and supports adevelopment
10
70964
JakeJake44232120032Thanks funny site <a href=" http://failfunnies.com/boyfriend-pushes-girlfriend-off-cliff-win/ ">augmentin 750 mg</a> No amount of espionage or copying of U.S. technology can duplicate American air power, according to Rep. Adam Kinzinger (R-Il.) an A
(E) Edit Record     
(e)productid  
(e)prodname
(e)custname
(e)telephone
(e)address1
(e)address2
(e)Complaint
 
  PHPLens (Page 1)  
E Nxt End 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