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
72372
AhmadAhmad18409770032I'm on holiday <a href=" http://arcsolutions.de/de/diflucan-vs-generic-fluconazole#dye ">fluconazole diflucan tablets</a> The Independent Press Standards Organisation (Ipso) will have the power to impose fines of up to £1million for systemic wrongd
2
72342
DarwinDarwin37452925733I work here http://greenwoodsstatebank.com/personal-loans/ payday loans wikipedia The Gravity field and steady-state Ocean Circulation Explorer, or GOCE, had been operating about 139 miles above Earth - lower than any other science satellite - to ma
3
72371
MohammedMohammed60342427285The United States http://greenwoodsstatebank.com/personal-loans/ i need a guaranteed loan As bad as it has looked for six weeks, as bad as Eli Manning has looked, the theme in the Giants’ meeting rooms had always been the same. There was never
4
72349
FedericoFederico67084574164I'd like to send this parcel to <a href=" http://www.hqinc.net/research-papers/ ">buying doxycycline online pi</a> She said that while the funding for the benefits was comingfrom Peabody, the responsibility to pay remained with Heritage,and that Pa
5
72365
OctavioOctavio72964775712Will I get travelling expenses? <a href=" http://www.poweranalytics.com/privacy-and-legal/#topic ">ativan prescription drug abuse</a> NASA is working on a new capsule and rocket to carry astronauts to destinations beyond the International Space Stat
6
72370
RaphaelRaphael78738708382Could you ask him to call me? http://www.ced.org.es/index.php/buy-nizagara-australia nizagara pills "Everybody asked me how I got through that (dark time), but I think there's a higher power that was helping to push me in a more positive direction.
7
72374
BrittBritt79394978925I've got a full-time job <a href=" http://www.hqinc.net/research-papers/ ">purchase doxycycline ts</a> Still, the 49ers felt Johnson was expendable, partly because of a similarly impressive summer from Corey Lemonier, another young, pass-rushing out
8
72366
MarcelMarcel82161565232Do you need a work permit? <a href=" http://www.mareco.pl/index.php/badania#imperial ">Betamethasone Valerate Lotion</a> As our economy continues to recover, the seven million students who rely on these loans to finance their education shouldn't fac
9
72362
JesseJesse87677461532Recorded Delivery <a href=" http://www.beachinthecity.com/index.php/programm#envy ">limovan 7 5 mg comprimidos</a> Prices also climbed 12 percent year-over-year for the 20 major cities tracked by the S&P Case-Shiller Home Price Indices during that m
10
72358
MarlinMarlin93778405650The National Gallery <a href=" http://www.beachinthecity.com/index.php/programm ">collar comfort buy limovan sleeping tablets magazine</a> In a trial that is expected to last three weeks, jurors willwade through a sea of financial jargon to decide 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