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
70923
SebastianSebastian67926897267Do you know the number for ? <a href=" http://www.aubergedjamilla.com/index.php/chambres ">geodon 80 mg capsules</a> The school where the children were poisoned is a tiny building with only one classroom for 50-60 pupils. The room has no lights nor
2
70928
SamuelSamuel38978579029I love the theatre <a href=" http://ef-srilanka.org/conference2012/ ">intentional amitriptyline 10mg cost beg</a> In most of Britain, sowing at any time in October works well. By January, plants will be showing new side shoots; pinch the tips of the
3
70942
pitfighterpitfighter83223421557Have you read any good books lately? <a href=" http://www.aubergedjamilla.com/index.php/chambres ">buy geodon 80 mg cu</a> "The administration has urged the security forces to exercise maximum restraint and caution," Earnest told reporters aboard Ai
4
70943
TaylorTaylor31062472949Could I have , please? http://www.aubergedjamilla.com/index.php/localisation geodon 20 mg once a day The QB is trying to win the Jets starting job, but is also facing an uphill battle with the fanbase. Come the second preseason game, it won’t take
5
70953
LandonLandon64694173774Photography <a href=" http://linuxrants.com/about-mike ">pregnant with twins clomid 50mg</a> SEC officials worried that bank regulators were pushing for restrictions so tight they could crimp banks' ability to buy and sell securities for customers.
6
70955
LuisLuis70829832524How much does the job pay? <a href=" http://corkfilmcentregallery.com/about-us/#software ">buy metronidazole online uk</a> I think it a shame that that these entertainment shows are considered &#8220;news&#8221;. They are not. They are purely for en
7
70962
DivaDiva58673279398Lost credit card http://www.aubergedjamilla.com/index.php/localisation geodon 20mg capsules Burma's president, Thein Sein, will face demands to rein in anti-Muslim violence when he arrives on an official visit to Britain on Sunday. He has been invit
8
70964
RachelRachel54370511461I'd like to speak to someone about a mortgage <a href=" http://redesaudedapopulacaonegra.org/participe ">duloxetine hcl prices</a> The company is currently in the middle of two big projects: Relocating its Chinese and Indian operatings to Singapore,
9
70965
VanessaVanessa68150953621Who do you work for? <a href=" http://www.aubergedjamilla.com/index.php/chambres ">geodon 80 mg price pb</a> The unique appeal of the kisses is their imaginative flavours, which range from hot cross bun to lemongrass and chilli to manuka honey (made
10
70967
VidaVida81691653242Will I have to work on Saturdays? <a href=" http://www.optimum.ie/momentum/prism ">cost albendazole</a> As his past has proven, for whatever reason, Harvey does things differently. The Qualcomm project was just another example. On Thursday, Harvey 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