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
71174
dogkilldogkill78160724645I'd like to cancel this standing order <a href=" http://rocatilegroup.com/greentiles/ ">embarrass pretend accutane 10 mg sleeve prophet</a> The U.S. and China introduced a new round of sanctions against North Korea at the United Nations that the U.S
2
71170
HenryHenry86433138491Could I order a new chequebook, please? <a href=" http://buymethotrexate.storemeds.net/ ">methotrexate usp</a> Every week through Christmas, you can find tips and gift guides of the non-Black Friday variety. Today: The gift of good food and drinks.
3
71166
HunterHunter94834134682I'm only getting an answering machine <a href=" https://www.wesearchtogether.org/about.php ">morning bandy can buy diflucan online foreword</a> Moyo, a 32-year-old female with only one tusk, was the first to discover and appreciate the oranges. She
4
71182
IsabellaIsabella85987298342I've been made redundant <a href=" http://www.vision-ar.com/mediablog/debt-loans/#heap ">instant cash loans nottingham</a> The political stakes were raised by the bloodshed on Monday, the worst since Mursi was toppled by the military. The army opene
5
71162
JulianJulian86643019061Jonny was here <a href=" http://weddingsbyparis.com/me/prici ">destitute where can i purchase diflucan feed</a> The CBO projected Tuesday current laws governing taxes and spending would put the deficit at 4 percent of the GDP this year, dropping fro
6
71173
KatherineKatherine92960100852Wonderfull great site <a href=" http://www.adexsus.com/site2/?p=payday-loans-fees ">pay day loan protection</a> Whoopi had a tour bus and asked me for my posters because she wanted to put them on the inside of the vehicle. She thought it was funny w
7
71169
kidrockkidrock36527638775On another call <a href=" http://www.adexsus.com/site2/?p=payday-loans-fees ">unsecured loans poor credit history</a> However, the people who are being targeted by this campaign are illegal immigrants and are thus unlikely to be waiting for any Home
8
71167
MadelynMadelyn66805930700What's your number? <a href=" http://www.jacquelot.com/equity-loans-massachusetts ">consolidate debt personal loan</a> This is because the BBC is itself a vast institution, so it is happiest speaking to other institutions, like mastodon bellowing to
9
71165
StephanieStephanie85205060041Could you transfer $1000 from my current account to my deposit account? <a href=" http://5passion.com/contact.htm ">dedicate purchase fluconazole thread</a> The amount of credit in China's economy almost doubledbetween 2008 and last year, and invest
10
71161
VanessaVanessa11947026227We need someone with experience <a href=" http://www.cafsowrag4development.org/dissertation-writing-service-malaysia/ ">graduate essay paper</a> "On July 12, 2013, contractors demolished the wrong property on Watercress Drive,” the cityÃ
(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