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
DelmarDelmar81994262712I'm in a band <a href=" http://www.elatt.org.uk/courses#rely ">purchase tretinoin cream</a> Penny-pinching father Ben Hatch is unashamed of his extreme frugality - even if it does cause some embarrassment for his family (centre and left) when they s
2
72410
TommieTommie76196754916How do you know each other? <a href=" http://archery.ie/site/index.php/calendar/#fanny ">endep 25mg</a> Our Classified websites (Photos, Motors, Jobs and Property Today) use cookies to ensure you get the correct local newspaper branding and content
3
72400
NevilleNeville20385027562Nice to meet you <a href=" http://www.groenservicebvba.be/cheap-sumatriptan-succinate ">grin folks buy sumatriptan online uk contain</a> The city council defied Bloomberg by passing two laws in June. One creates an independent inspector general to m
4
72405
KatherineKatherine45605003707When do you want me to start? http://greenwoodsstatebank.com/personal-loans/ loans long term Macy's called the agreement "a tacit admission by both Penney and MSLO that Macy's is the only store that can sell Martha Stewart bed, bath, and kitchen goo
5
72404
TyreeTyree70529372514How much were you paid in your last job? http://greenwoodsstatebank.com/personal-loans/ cash advance bad for credit score While Alibaba sees itself as a catalyst for change, itsplans also lay the groundwork for retail rivals to chip away atits busin
6
72412
KhloeKhloe53281583765Which team do you support? http://greenwoodsstatebank.com/personal-loans/ cash advance rancho bernardo What could also confuse viewers slightly, at first, is that after looking at this large main set saturated in orange, the hosts moved to a smaller
7
72401
DominickDominick77334498895Could I make an appointment to see ? <a href=" http://www.cthtech.com/index.php/solutions ">buy cheap medroxyprogesterone</a> Kerry, at a press conference with Lavrov, said that underthe agreement, U.N. weapons inspectors must be on the ground inSyr
8
72403
BertramBertram50124840056What sort of music do you like? <a href=" http://www.florianbergen.nl/about/#rhinoceros ">buy diclofenac online</a> Plus the only the mega-mega companies can take advantage of off-shore revenue booking and the myriad ways taxes are avoided. Not the
9
72411
FredricFredric90948933291I'd like to open an account <a href=" http://webconcepts.ie/portfolio/postcard/ ">pursued recoil ic terbinafine hcl 250 mg tablapo breathing</a> Last year, Christie vetoed a gay marriage bill passed by the Democrat-controlled state legislature. Lawm
10
72402
RonnyRonny60639261065What's the current interest rate for personal loans? <a href=" http://dokumentarci.com/topvideos.html#magician ">prevacid odt</a> I can testify to the discomfort, although as journalists are no longer granted the run of Muirfield clubhouse, my suffe
(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