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
72409
DarylDaryl88859422101It's a bad line <a href=" http://www.verenigingmolenvrienden.nl/het-molenmuseum.html#dene ">300 mg clindamycin</a> Since 2007 the country has made real progress in achieving economic growth as part of programmes instituted by the government of Presi
2
72410
GiannaGianna81687515221Do you know the address? <a href=" http://www.plasconspaces.co.za/inspire/ ">suck ineffective buy xenical cheap uk pointing</a> Good spot? Make it the garden spot amid the Muirfield wilderness. Woods walked off the course as the co-clubhouse leader
3
72400
DominickDominick66584957657Could you tell me my balance, please? <a href=" http://www.florianbergen.nl/about/#indifferent ">voltaren cream</a> "Like people across the country, Connie Britton saw thousands of Texans stand up last week and demand to be heard, and she wanted to
4
72405
MagicMagic88023437221Thanks for calling http://www.galizacogalego.com/avoaescola bimatoprost ophthalmic solution canada The recommendations arose amid intense interest from thepublic and some members of Congress, prompting the U.S. FederalAviation Administration l
5
72404
PrincePrince69816602456Get a job <a href=" http://www.elatt.org.uk/courses#thereafter ">buy tretinoin</a> Prompted by a sharp increase in the cost of public transport, an estimated 10,000 people attended a rally calling for the dismissal of Kaliningrad governor Georgi Boo
6
72412
SanfordSanford48657833357I do some voluntary work <a href=" http://www.wadebridgefoodbank.org/storehouse-shop/#bit ">price of glucophage</a> “After every practice, he always took three, four guys with him to help work on different things,” Vigneault sa
7
72401
NevaehNevaeh45327483696I went to http://www.aitvm.org/aitvm.org/index.php/grifulvin-v grifulvin v "We can do as much as we can to not affect the work force, but that's a difficult thing to do," Sheil said. "We've scrutinized the non-employee costs first, but it's just no
8
72403
DerickDerick88044041960International directory enquiries http://raventosrosell.com/portfolio/cava/ betamethasone brand name &ldquo;What we did see from Lee this week was that his putting and short game have improved immeasurably in the last six months and once he gets
9
72411
BurtonBurton57389061786Lost credit card http://www.contravision.de/en/geodon-20-mg-efectos-secundarios.html geodon 20 mg vial As Detroit seeks bankruptcy protection that could slash pension benefits to city workers and retirees, and leave bond holders with only pennies on
10
72402
LilyLily50788096755It's serious <a href=" http://www.hungarianbiotech.org/index.php/ketotifen-australia#overall ">ketotifen 1 mg</a> Some 18 months after the hulking ship ran aground, it is a daily reminder of slow the progress in dealing with the aftermath has been.
(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