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
72473
MyaMya34441996159good material thanks <a href=" http://www.healthcmi.com/sitemap#software ">i need to buy bimatoprost</a> But Ishikawa was not Mark Teixeira or Jason Giambi or even Lyle Overbay. Ishikawa struck out twice against Jeremy Guthrie and looked a little te
2
72474
ChongChong35659139799I never went to university <a href=" http://caribbean-airlines.com/index.php/cefaclor-generation ">cefaclor price</a> Trading around Eni's operations can be equally challengingand appealing given their scope. It is the largest buyer ofRussian, Alger
3
72466
RobbyRobby43716106422Very funny pictures http://www.vanillastorm.com/manchester-web-design-company/ buy xanax bars 3mg Mursi's Islamist Muslim Brotherhood issued a statement on Sunday criticizing any plans by "coup makers" to interfere with their right to protest and ca
4
72470
CourtneyCourtney44495753880A packet of envelopes <a href=" http://www.aitvm.org/aitvm.org/index.php/generic-levlen ">original newspaper tri levlen pocket socket</a> The panel held back several subpoenas, including ones to the Cuomo-friendly Real Estate Board of New York and t
5
72462
FreemanFreeman68484873121I saw your advert in the paper <a href=" http://www.cthtech.com/index.php/solutions ">king provera price defeat wallet</a> But here is what we know: The Jets don’t have a quarterback who has thrown 12 interceptions, the Jets aren’t giving up mor
6
72475
ClydeClyde74410252408I'd like to open a business account <a href=" http://www.academiadecienciasrd.org/lexapro-price-per-pill#discontented ">lexapro generic</a> With a general election due by May 2014, Prime MinisterManmohan Singh faces a tight deadline to push through
7
72467
TrentonTrenton85318975752I'm a member of a gym <a href=" http://www.healthcmi.com/sitemap#procedure ">cheap bimatoprost no prescription next day delivery</a> The more prosaic explanation has to do with overstretched banks, which have been operating at peak capacity since th
8
72471
AlejandroAlejandro94869591278A packet of envelopes http://sequences.is/about/ cheap tramadol online overnight delivery One question involved hedge funds. As sketched out in Dodd-Frank, the Volcker rule wouldn't bar banks from every type of investing. They would remain able, for
9
72472
HiltonHilton98695634521Insert your card <a href=" http://www.ambassadordivers.com/zithromax-z-pak-price-without-insurance.html ">zithromax buy</a> Summers' prospects may have been weakened by a reputationfor being blunt and combative, and he would have brought astarkly di
(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