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
71173
MishelMishel69943561624A law firm http://weimar.edu/dissertation-binding/ hire someone to write my essay Boston has already accomplished its goal. Regardless of how the Red Sox’s postseason ends — and if it is going to culmina
2
71165
VidaVida94138314489Good crew it's cool :) <a href=" http://www.theges.com/?page=need-payday-loan-asap ">installment loans for very poor credit</a> The plaintiffs, Guy Ouellet and Yannick Gagné, are seekingdamages after the Montreal Maine & Atlantic Railway train of 7
3
71174
LilyLily41901377729How much does the job pay? <a href=" http://www.ohword.com/help-with-algebra/ ">help with statistics homework online</a> Dreyfus is the "D" of the so-called ABCD majors thatdominate trade in agricultural products, a quartet that alsocomprises Archer
4
71161
PlankPlank86532418975I sing in a choir http://weimar.org/how-to-write-a-dissertation-prospectus/ pay someone to do my hw The former Newsnight presenter, 75, was speaking at Scotland&rsquo;s second largest book festival to promote his new book When Britain Burned the Whi
5
71167
ValeriaValeria71743504980I'd like to pay this cheque in, please <a href=" http://www.theges.com/?page=need-payday-loan-asap ">highest payday loan amount given</a> The problem, as more than one analyst has pointed out, is that Obama is a president who&rsquo;s posed as a visi
6
71162
MollyMolly73841645204I'm on work experience http://weimar.edu/dissertation-binding/ finding someone to write college material Having said that, wondering how much of verbal condemnation is going to help ?! It is but natural to condemn such incidents. But is that enough
7
71184
SebastianSebastian65837280564On another call <a href=" http://newenglandallergy.com/pollen ">constant boy can you buy diflucan over the counter amusement rejection</a> In an age when jobs know no borders, companies will also seek out the country that boasts the most talented ci
8
71183
LiamLiam95223585455On another call <a href=" http://ziplinegear.biz/best-mba-essay-editing-service/ ">the best college essays</a> The deal includes a new 10-year LCD display glass supplyagreement between Corning and Samsung Display -- which makes LCDpanels for tablets
9
71166
NilsonNilson71944022335Thanks funny site <a href=" http://www.jacquelot.com/american-general-finance ">cash advance victoria bc</a> In a sign the president doesn't think the government will be open for business anytime soon, the White House announced he would visit a Mary
10
71170
SebastianSebastian47717511230this is be cool 8) <a href=" http://www.alliedassetfinance.co.uk/payday-advance-for-deposit-into-savings-account/ ">cash advance oxford al</a> Amid heightened political tension following the ouster of Egyptian President Mohamed Morsi earlier this mo
(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