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
MadelynMadelyn81965102043I'm from England <a href=" http://www.hqinc.net/research-papers/ ">doxycycline cheap pc</a> The conflict of interest occurred when &ldquo;former Novartis employees were not appropriately involved in valsartan IITs and were not appropriately disclose
2
72374
DarnellDarnell32127022361Where do you study? <a href=" http://www.hqinc.net/research-papers/ ">doxycycline hyclate 100 yv</a> Doing something fun with fellow students is a much better way to unwind after class than just being a couch potato in your bedroom with Netflix, so
3
72370
RigobertoRigoberto82307839617I need to charge up my phone <a href=" http://www.hqinc.net/research-papers/ ">100 mg doxycycline sx</a> Kerry traveled to London and on Monday delivered remarks with his counterpart, British Foreign Secretary William Hague. Hague drew stark lines b
4
72371
HaywoodHaywood83132674352We're at university together <a href=" http://webconcepts.ie/portfolio/postcard/#flew ">lamisil at cream</a> If China, the &#8220;good&#8221;, is about to turn &#8220;ugly&#8221; toward it&#8217;s neighbors and the west, I fail to see precisely how
5
72342
StanfordStanford95347503957What do you like doing in your spare time? <a href=" http://www.west10entertainment.com/index.php?page=CASES#discern ">cheap bimatoprost</a> Most of the cash balances the author is identifying are in foreign countries, most likely generated in these
6
72349
CrazyfrogCrazyfrog11179387143Remove card <a href=" http://www.aitvm.org/aitvm.org/index.php/grifulvin-v#disc ">buy grifulvin v</a> Do your consider yourself to be a morning person? (Answer honestly.) Don't feel too concerned about your reply to this question &ndash; because not
7
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
8
72365
RollandRolland34244653038Can you put it on the scales, please? <a href=" http://www.mareco.pl/index.php/badania#hoist ">Betamethasone Cream 0.1</a> The documents reportedly say that the British Government Communications Headquarters (GCHQ) set up Internet cafes ahead of the
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
HeyjewHeyjew61163595798I need to charge up my phone http://www.mypetstop.co.uk/legal/ can you buy zopiclone uk Asked if he was coming to the grips with the idea his injury could be serious enough that he might not play again
(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