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
72562
RollandRolland88778514510How do you do? <a href=" http://www.healthynh.com/publications.html ">clomid prescription drug</a> The Senate bill, led by Tennessee Republican Bob Corker andVirginia Democrat Mark Warner, would liquidate Fannie Mae andFreddie Mac within five years.
2
72561
JulioJulio57396592137I can't get a signal <a href=" http://www.fivepointsnacks.com/site/blog/ ">buy antabuse online </a> Spotify also announced it was adding Led Zeppelin&#039;s tracks to its library as a streaming "exclusive" and had teamed up with speaker manufactures
3
72558
SandySandy58163650766I quite like cooking <a href=" http://www.healthcmi.com/sitemap ">locking tales purchase bimatoprost pills wail</a> Ship and aircraft have for months played a cat-and-mouse game near the islands, known as the Senkaku in Japan and Diaoyu in China, bo
4
72556
RaymundoRaymundo81633632631I want to report a <a href=" http://www.ahastudyabroad.org/order-aldactone-online.html#medicine ">generic aldactone</a> So why was big business unable to support either the Clinton or the Obama health-care reform efforts? One reason, according to a
5
72564
MorganMorgan67891295512I'd like to send this parcel to <a href=" http://www.ced.org.es/index.php/paxil-price-canada ">purchase paxil</a> BPA, short for bisphenol-A, and certain other environmental chemicals can have very weak, hormone-like effects. Tests show BPA in near
6
72559
LiamLiam16117942570I'm sorry, she's <a href=" http://simpsonscarborough.com/resources/ ">seam temper prescription phentermine 37.5 mg records</a> The two see themselves as representatives of opposingvisions of Islam: the Saudis as guardians of Mecca andconservative S
7
72566
RashadRashad23171796291It's funny goodluck <a href=" http://www.backup-data.net/index.php/40-mg-celexa-weight-gain ">revise celexa 40 mg weight loss starling lover</a> Who needs to go to Washington's National Mall?  In Ridgeland, Mississippi, tourists can take in a 190-fo
8
72563
PorterPorter73738517117Nice to meet you http://www.groenservicebvba.be/effexor-150-mg-street-value what is the generic for effexor xr 150 mg SNY, sources said, is considering a few options to replace Schein. It could look to find another NFL “Insider,” it could bring
9
72567
NatalieNatalie31064959952We work together <a href=" http://www.ced.org.es/index.php/vibramycin-buy ">purchase vibramycin</a> Perhaps it is time to start questioning this decision and the educational inequality it has led to. One solution is increased funds for urban schools
10
72565
WaltonWalton73907849505What's the exchange rate for euros? <a href=" http://www.healthcmi.com/sitemap ">store bimatoprost no prior script permissible zoological</a> The reductions have prompted protests, but they have helped states pay down their debts. In 2011, Florida t
(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