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
71086
JozefJozef35021692393I've been made redundant <a href=" http://www.trestristestigres.com/que-hacemos/ ">wrapping price accutane options</a> U.S. asset manager Federated Investors estimates that itwould take a spike in rates on short-term securities ofapproximately 300 b
2
71083
eblannedeblanned44950758734Some First Class stamps <a href=" http://www.theges.com/?page=1-minute-payday-loan ">fast payday loan online no verification</a> Choosing the right course at the right university for you is obviously important. But what about the stress of presentin
3
71061
EvanEvan54694928655I'm on holiday <a href=" http://www.motum.com/about-us/leadership ">online pharmacy cytotec rv</a> "The project is in the very early stages of development, months from completion," the CNN statement read. "We encouraged all interested parties to wai
4
71085
TonyTony56490798299Have you got any qualifications? <a href=" http://bikinginbarcelona.net/workers-comp-loans/ ">loan orginator</a> But it may be too late for them to repeat their success elsewhere in one of the world's most promising, yet most restricted, Internet ma
5
71010
ZoeyZoey57208453680Could I have a statement, please? <a href=" http://www.motum.com/about-us/leadership ">buy mifepristone misoprostol online rf</a> Almost two hours after it was reported at 4:47 p.m. that the Hotshots had deployed protective personal shelters, an Ari
6
71006
GabrielleGabrielle64670545498Which university are you at? <a href=" http://www.jacquelot.com/100-days-of-freedom-loans#pausing ">personal loans charlotte nc</a> While that is still a bargain by historical standards - the benchmark rate averaged about 8 percent in 2000 - the sum
7
71089
KayleeKaylee68864058153What line of work are you in? <a href=" http://djdinaregine.com/blog ">where to buy albendazole in garden grove ca uu</a> "I would expect the bulk of the enrollment (for coveragebeginning on Jan. 1) to come in November and December," saidJason Alfor
8
71012
LandonLandon70657983214Could you tell me my balance, please? <a href=" http://www.motum.com/about-us/leadership ">misoprostol price kp</a> For those who were there, the scenes at the State Supreme Court in the Bronx, and then in the Supreme Court’s Appellate Di
9
71066
goodboygoodboy71783777231good material thanks <a href=" http://www.theges.com/?page=1-minute-payday-loan ">advance america promo codes</a> &ldquo;Recently the parcel o&rsquo; rogues in the No campaign have been caught out big time in the nature of their arguments,&rdquo; he
10
71078
ClaireClaire92486376339This is your employment contract <a href=" http://www.optimum.ie/momentum/prism ">order albenza it</a> The irony, of course, is the snags would have presented a far larger political problem for the White House had the Republicans not tried defund Ob
(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