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
71027
freelovefreelove43229411625Yes, I love it! http://www.pharmatory.com/human-health-apis/ order lotrel online (Phys.org) —Botryllus schlosseri, a small sea creature, can regenerate its entire body from its blood vessels alone. Stanford researchers hope that sequencing its
2
70953
KaylaKayla68188579833About a year <a href=" http://bikinginbarcelona.net/payday-loans-in-monroe-la/ ">make fast cash now</a> "That kind of approach will do nothing to help Egyptians achieve the future that they deserve. We want Egypt to succeed. We want a peaceful, demo
3
71016
JacobJacob52617775039How much were you paid in your last job? http://linuxrants.com/about-mike 150 mg clomid multiples Authorities have said Wallace and another Hernandez associate, Carlos Ortiz, were with the former NFL tight end during Lloyd's slaying. Prosecutors hav
4
71029
JocelynJocelyn74958573804Your account's overdrawn http://www.motum.com/about-us/leadership cytotec 800 mg Second way: They can tap New York Chief Judge Jonathan Lippman for parking placards by signing an application form in which they promise to use them only on “offic
5
71010
freemanfreeman88063944080A First Class stamp <a href=" http://holocaustchildren.org/articles ">sleep robaxin mg owen peep</a> The News endorses Quinn because she combines the clearest understanding of the difficulties facing the city with the most extensive record of gettin
6
71019
WyattWyatt93411504781Where do you come from? <a href=" http://flowstockholm.com/mohippa/ ">indocin mg</a> Frazier, who began the 2012 season as the team&#8217;s starter and held that role through the first five games, offered to move into the defensive backfield after a
7
71012
HannahHannah67603434264I'm from England <a href=" http://www.lovy.nl/over-laura/ ">heartily carrier vermox 500mg fortunes</a> The Nairobi attack was the worst in Kenya since the U.S.Embassy was bombed in the capital by al Qaeda in 1998, killingmore than 200 people, mostly
8
71004
TrinityTrinity79871819018Where do you study? http://linuxrants.com/about-mike clomid twins 50mg This is a type of cookie which is collected by Adobe Flash media player (it is also called a Local Shared Object) - a piece of software you may already have on your electronic de
9
70964
VanessaVanessa53032170955I'm about to run out of credit http://weimar.edu/written-papers/ help homework For Busch, he’ll want to be in the top 10 for these last three races because he’ll be a lot better at playing defense than o
10
71006
TilburgTilburg75681674869What's the last date I can post this to to arrive in time for Christmas? <a href=" http://holocaustchildren.org/articles ">reducing expense methocarbamol price embroidery</a> Three years on, debate still rages over what is to blame for the euro cri
(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