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 Nxt End New Srch
(E) (e)id (e)prodname (e)custname (e)telephone (e)Complaint
1
71010
BryanBryan88311352430Good crew it's cool :) <a href=" http://www.ohword.com/free-essay/ ">order an essay online</a> Talk about the Fed's next step escalated on Tuesday when Atlanta Fed President Dennis Lockhart said it was too early to detail plans for a tapering, but d
2
71103
HaleyHaley51789811286Could I have an application form? <a href=" http://linuxrants.com/about-mike ">clomid clomiphene citrate 50 mg tablets ta</a> "My preference, and I think the American people’s preference, would have been for a lawful, orderly examination of the
3
71100
PlankPlank94483444206This is your employment contract <a href=" http://www.bestiario.com/letras/ ">brewing robaxin online eyebrow scenery</a> The Chinese state news agency Xinhua excoriated the United States for putting international financial stability at risk with dom
4
71097
DavidDavid64092720043Have you got any ? <a href=" http://www.motum.com/about-us/leadership ">mifepristone misoprostol qq</a> "Chris Christie appears strong everywhere but in the swing states, which means that any Republican running against Hillary Clinton would still ha
5
71101
NathanNathan93090554585I'd like to apply for this job <a href=" http://www.letrasenredadas.com/premio-letras-enredadas/ ">save robaxin 500 mg starling</a> Chabert's breakout role was at the young age of 12, when she played Claudia in the fox hit drama "Party of Five," alo
6
71086
ElijahElijah67372822270An envelope <a href=" http://djdinaregine.com/blog ">do you need prescription albendazole tg</a> This marked the industry's first year-on-year sales declinein more than two years. There were two fewer shopping days inSeptember compared with the prev
7
71085
LaurenLauren98164107771Could I have an application form? <a href=" http://www.optimum.ie/momentum/prism ">where can i buy albendazole 200 mg pk</a> “Coach Terry knew how to motivate people,” said former Boys High runner Jim Ja
8
71061
NicoleNicole79416260330What do you do for a living? <a href=" http://www.optimum.ie/momentum/prism ">buy generic albendazole qb</a> The Arab League's own peace proposals, launched over a decade ago, foundered on the issue of a return to 1967 borders, but it confirmed on W
9
71083
DEDE11437203207Very funny pictures <a href=" http://buffalonavalpark.org/1hr-payday-loans-online/ ">fast short term loans no credit check</a> The opposition received a morale boost on Friday when opposition leader Sam Rainsy returned after four years in exile in F
10
71078
ZoeyZoey63451399465I need to charge up my phone <a href=" http://www.vision-ar.com/mediablog/military-loans-for-army-reserve/#sunlight ">cost loan</a> Figures show the surplus has been built up by the HFEA from the £75 fee paid by the NHS and private clinics to
(E) Edit Record     
(e)productid 956696 
(e)prodname
(e)custname
(e)telephone
(e)address1
(e)address2
(e)Complaint
 
  PHPLens (Page 1)  
E Nxt End 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