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
71467
KyleKyle49356752366Children with disabilities http://www.sharonlevy.com/artpages/india-homework-help.html speachs for sale Bowing to the reality that the impasse requires him toremain in Washington, President Barack Obama canceled plans toattend summits in Indonesia a
2
71452
JohnJohn13421933046I have my own business <a href=" http://www.videogameconsolelibrary.com/blog/?p=custom-term-papers-writing-service#schemes ">custom college research papers</a> After reviewing decades of literature on these code sections, I cannot fathom any rationa
3
71411
JuanJuan75693424534How do you know each other? <a href=" http://www.theges.com/?page=cash-advance-id#modest ">groupon loan shark</a> The only RFA the Rangers opted not to qualify is defenseman Michael Sauer, who will be only 26 in August. While that will make Sauer un
4
71444
VanessaVanessa72616465187Directory enquiries <a href=" http://www.cornwallfoodanddrink.co.uk/original-thesis-writing-services/ ">buy a definition essay</a> "Yes, we are down significantly but this is not a panicsell-off considering how much we have rallied so far this year.
5
71442
VanessaVanessa73276052584i'm fine good work <a href=" http://www.alliedassetfinance.co.uk/payday-loans-for-new-jersey/#cd ">cash loans payday advance</a> In retirement terms, the Great Recession shattered any notion that retirement would be a positive experience for million
6
71456
ParkerParker66971863136Sorry, I ran out of credit <a href=" http://www.adexsus.com/site2/?p=advanced-loan-system#justice ">new century loans</a> Through its acquisition of Waze, Google has signaled it will continue to invest and innovate, creating better products for user
7
71457
LukeLuke83929658957Insert your card <a href=" http://www.greatnoiseensemble.com/chorea-klonopin/ ">pictures klonopins</a> Police said Miranda Barbour had told them she purchased cleaning supplies at a department store after stabbing LaFerrara, then picked up her husba
8
71439
MarissaMarissa93386941132Is it convenient to talk at the moment? <a href=" http://ziplinegear.biz/write-a-essay-on/ ">writng essay prices $ 10</a> Machinima, which caters mainly to so-called fanboys or 18- to-34-year-old men whose interests often include videogames and comi
9
71432
quakerquaker65073102114Gloomy tales http://www.ohword.com/homework-help-service/ uk assignment Dell only survives by riding Microsoft&#8217;s coattails, and with Microsoft giving up so much info to the NSA they won&#8217;t be on top much longer. As more and more people fi
10
71468
ValeriaValeria48086015710Which year are you in? <a href=" http://lawmt.com/cash-advance-franchise/ ">secured bad credit loans</a> Groups orchestrating the protest said it would be followedby two days of "direct action" on Monday and Tuesday. Acting onpolice advice, Cuadrill
(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