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
71445
JuanJuan71986613135Photography <a href=" http://lawmt.com/credit-personal/#analysis ">payday loans san francisco</a> In purely pragmatic terms, Turkey also carries less political clout than Russia. Suspending the federation that is hosting the World Championships summ
2
71436
JanniJanni21374853293A jiffy bag <a href=" http://www.pensionfreedom.ie/lending-club-number#investment ">cash loan lenders no credit checks</a> But Cruz held out for more, skipping the Giants’ offseason workout program and their minicamp, while telling friend
3
71411
JesusJesus91707731558Do you know the address? <a href=" http://www.warwickhughes.com/blog/?p=professional-grad-school-essay-writers ">professional letter writing services uk</a> The move is expected to boost the production of consumerdurables items such as two-wheelers,
4
71444
MariahMariah23318983579I was made redundant two months ago http://weimar.edu/i-need-help-writing-a-descriptive-essay/ pre written persuasive speeches The bourse first halted trading in diversified companyBlumont Group Ltd, whose stock has risen as much as 12fold this year
5
71442
OliviaOlivia35246239987Thanks for calling http://www.videogameconsolelibrary.com/blog/?p=writing-assignments-service writing jobs online Regeneron and Sanofi are hoping their new medicine will be a compelling treatment option for the estimated 1 million Americans who cann
6
71434
TommyTommy30823382648We need someone with experience <a href=" http://www.warwickhughes.com/blog/?p=professional-grad-school-essay-writers ">essay written by students</a> "On the other hand, this growth was milder than expected due to a muted order pattern during the qu
7
71402
GabrielGabriel50352040141I'd like to transfer some money to this account http://www.ohword.com/essay-on-my-best-friend/ custom essay writing australia The men, who were wearing women's clothes, were rounded up earlier this month after gathering by the historic moat in the c
8
71439
JesusJesus37936325677I came here to work <a href=" http://www.warwickhughes.com/blog/?p=custom-writings-discount-code ">snow naughty purchase a research paper believing shop</a> Since entering office, President Obama has set in motion a plan to cut the rolls of active d
9
71432
TylerTyler24711636015How long have you lived here? http://weimar.edu/i-need-help-writing-a-descriptive-essay/ research papers and essays Abu Muhadjar also denies they will be a threat: "That&#039;s slightly surreal to go back to UK and start a jihad there. I do understa
(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