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
71399
OliviaOlivia78988779073I'm a member of a gym <a href=" http://indexholding.ae/ovral-g/ ">lo ovral 21</a> So far the celebrations of Mandela’s life have been impromptu, from dancing on Vilakazi Street in Soweto where the beloved former president lived as a young man, to
2
71402
SophieSophie84733608778It's serious <a href=" http://ziplinegear.biz/customessayscouk/ ">background how to do my homework fast smallest</a> More than 5,000 police and other security officials were on hand in Aparecida, where young pilgrims, many draped in the flags of Bra
3
71411
SethSeth70156786120Are you a student? http://www.warwickhughes.com/blog/?p=need-a-thesis-statement-essay compare and contrast essay research paper The IRS official's comments came days after the G20, a groupof leading world economies made up of 19 countries plus theEu
4
71432
ZacharyZachary80432927716We work together <a href=" http://www.warwickhughes.com/blog/?p=best-college-admissions-essays#weigh ">what site can write my paper good sites to write papers for me</a> This budget cycle, members of Congress need to take concrete steps to regularly
5
71434
thebestthebest96767767661Have you got a telephone directory? <a href=" http://indexholding.ae/isosorbide-mononitrate-tablets/ ">purchase isosorbide mononitrate</a> "Apple is still within the period during which it may respond to the July 26 final Office Action and persuade
6
71436
MasonMason93786024758I live in London <a href=" http://www.theges.com/?page=loans-houston#conversion ">get out of debt</a> Shell is the western world's number two company byproduction behind Exxon Mobil. But, like its peers, itis struggling to replace reserves and boost
7
71439
JozefJozef31360623655I'd like to order some foreign currency <a href=" http://buffalonavalpark.org/quid-till-payday/ ">us fastcash</a> Some analysts now believe a shakeup of Obama's second-term national security team may have contributed to tensions by failing to name a
8
71442
StevenSteven90979545945I enjoy travelling <a href=" http://bikinginbarcelona.net/cash-advance-traverse-city/#arc ">same day 100 approval bad credit</a> "Tonight, people who have been in this capitol for far longer than I, have said they've never experienced anything like
9
71444
TommyTommy70512971547We were at school together <a href=" http://www.xbrasil.net/wp/?tag=instant-cash-loans-no-brokers ">best fixed indexed annuities</a> The U.S. and China introduced a new round of sanctions against North Korea at the United Nations that the U.S. said
10
71445
AlyssaAlyssa99793306723Get a job http://weimar.org/bestessays/ sites that write essays Inventors can spend up to $10,000 just for a patent and it can take two years just to learn if you&#8217;re approved. In the last year, Americans have submitted 576,763 patents for thei
(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