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
70910
TylerTyler63447052166Have you got any ? <a href=" http://transformmilwaukee.com/investment/ ">escitalopram buy</a> After the House vote on retroactive pay, Kevin McCarthy, the Republican majority whip, said his party was ready to negotiate with Obama and his fellow Demo
2
70914
TimothyTimothy94137002861I'm sorry, I didn't catch your name <a href=" http://demilovato.com/bio/ ">abide bellow where to buy orlistat over the counter abundance</a> Puerto Rico finance officials gave no details of theisland's near-term issuance plans, with GDB Board Presid
3
70942
SophiaSophia24762213985I've only just arrived <a href=" http://www.leerowingclub.com/club-location ">where t buy zyban nline</a> The tragedy was the greatest loss of life from a U.S. wildfire in 80 years, and the highest number of American firefighters killed in a single
4
70928
LillianLillian17053482410How many would you like? <a href=" http://failfunnies.com/boyfriend-pushes-girlfriend-off-cliff-win/ ">precio augmentine 750</a> Mr. Tsarnaev&#8217;s mother, Zubeidat Tsarnaev, had tried to make ends meet for her family by working as a home health a
5
70943
DEDE44597824996Remove card <a href=" http://www.leerowingclub.com/club-location ">nn-prescriptin zyban</a> Matthew McConaughey and his pregnant wife Camilla Alves spent some quality time with their growing family on July 22, 2012. Alves put her baby bump on displa
6
70920
steep777steep77732868201699Could you please repeat that? <a href=" http://santafyme.com/buysildalis/ ">buy sildalis</a> Harris also has an impressive collection of British titles. He’s an Officer of the Order of the British Empire (OBE) and a Member of the Order of the Brit
7
70931
HunterHunter20888395092Will I get travelling expenses? <a href=" http://barbicantheatre.co.uk/workshops/ ">buspar 15 mg twice a day</a> "You see how that generator’s kicked-in because the powers gone out?" Rotich said. “We wanted to create a way for people to co
8
70923
ClaireClaire60653001115Have you got any qualifications? <a href=" http://5passion.com/contact.htm ">costo del diflucan</a> Like Conrad, Tell hails from Orange County, Calif. &#8220;He is very good for me because we have a lot in common as far as where we grew up,&#8221; s
9
70926
LioncoolLioncool60738655113I live in London <a href=" http://barbicantheatre.co.uk/workshops/ ">buspar 15 mg recreational</a> A month after he retired, Giles&rsquo; father was diagnosed with cancer. This coincided with Giles&rsquo; pneumonia and created the perfect storm. &ld
10
70939
AshleyAshley58201905695I'm on work experience <a href=" http://www.failfunnies.com/baby-leash-parenting-fail/#enjoyed ">augmentin 250 mg/5ml</a> At euronews we believe in the intelligence of our viewers and we think that the mission of a news channel is to deliver facts w
(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