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
71453
JohnJohn99571621521Jonny was here <a href=" http://www.ohword.com/professional-paper-writer/#invade ">accounting homework help free</a> The Brotherhood&#8217;s description of the bloodshed, in which dozens people were killed, is starkly different from the army&#8217;s
2
71452
ZoeZoe95613601031A packet of envelopes <a href=" http://lawmt.com/no-fax-loan-lenders/#faces ">instant loans</a> Johnny Weir is all about razzle-dazzle showmanship, but on New Year's Eve 2011, the Olympic skater threw a little bling into the mix. Weir, 27, tied the
3
71411
AngelAngel64616562353Your cash is being counted <a href=" http://www.alliedassetfinance.co.uk/are-home-equity-loans-tax-deductible/ ">alternative lending</a> Seehofer wants to put behind him the 2008 election, when the CSU scored its worst result in six decades, 43 perc
4
71444
MadisonMadison87218258259I live here <a href=" http://www.adexsus.com/site2/?p=equity-builder-loan#risk ">instant payday loans no phone calls</a> The IEA was founded during the aftermath of the 1970s oil crisis in order to manage the release of emergency stocks of oil. The
5
71442
WyattWyatt72702532000How would you like the money? <a href=" http://buffalonavalpark.org/redleaf-loans/#europe ">instant cash services</a> Facebook had easier options that it could have considered beside launching its own mobile app. Yet it pursued that path. Producing
6
71456
EmmaEmma55370016652Where are you from? <a href=" http://www.theges.com/?page=loans-with-no-deposit-required#persistent ">subaru loan</a> William Avery-Wright died outside Worth School in Crawley, West Sussex, on his way to a school rugby match. His parents are suing t
7
71457
SavannahSavannah39208342203Just over two years <a href=" http://www.alliedassetfinance.co.uk/homeowner-financing/#flourishing ">personal installment for retirees</a> "I may have been through hell and back, but I am strong enough to walk through hell with a smile on my face an
8
71439
MadelineMadeline95442359050Through friends <a href=" http://www.videogameconsolelibrary.com/blog/?p=writing-essay-introductions ">speech writing help</a> "If Ralph thinks it's needed, God bless him. This is America," he said. "I'll personally find it amusing the first time hi
9
71432
FaithFaith38064181756Will I have to work on Saturdays? <a href=" http://www.theges.com/?page=loans-with-no-deposit-required#distribution ">next day loans</a> Carrie Ann Inaba got quite the surprise when she guest hosted 'Live with Regis and Kelly.' The 'Dancing with the
10
71459
AngelAngel17857704824We were at school together <a href=" http://www.xbrasil.net/wp/?tag=same-day-low-interest-rate-cash-loans#locked ">installment loans utah bad credit</a> "I get a bit bored by some of the things on the main stages," said Flo Lipin, 35, as she queued
(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