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
72564
DeadmanDeadman73306898499I went to <a href=" http://www.common-sense.at/en/abilify-15-mg-tabletta#ankle ">abilify tabl 15 mg</a> Our changing rooms might not be quite up to the standard of Lord&rsquo;s, which is like a five-star hotel, but they have two baths and 11 shower
2
72566
EmmettEmmett64187476038We used to work together <a href=" http://www.ced.org.es/index.php/erythromycin-500-mg-uses ">erythromycin eth such 500mg tablets</a> Comparisons with British wartime coalitions have always been specious: in the Second World War, as in the First, al
3
72581
LelandLeland47363898976I like watching TV <a href=" http://www.afceco.org/buy-macrobid#subquery ">order macrobid</a> Some 18 months after the hulking ship ran aground, it is a daily reminder of slow the progress in dealing with the aftermath has been. The remains of two o
4
72582
TeodoroTeodoro51260038061Could I take your name and number, please? http://www.contravision.de/en/tequinol-500-ciprofloxacin.html cipro 500 mg prices "Weight gain prevention has important health benefits for this population and prevention messages have sociocultural salienc
5
72583
RosendoRosendo17118591316How much notice do you have to give? http://arcsolutions.de/de/buy-eriacta cheap eriacta "This rule is really, really important to investors because it will shine a light on the pay ladder within a company," said Vineeta Anand, the chief research an
6
72585
OsvaldoOsvaldo81016612003We'd like to invite you for an interview http://www.afsbt.org/index.php/glucophage-for-sale glucophage er Some sources familiar with the situation say the Kremlin iseager to repair the rift with Belarus, for which potash is amajor source of revenue,
7
72586
WilmerWilmer66484375838What sort of music do you like? <a href=" http://www.contravision.de/en/atorvastatin-costco-pharmacy.html ">discount atorvastatin generic lipitor</a> The personnel drawdown at the Lahore consulate was a precautionary measure and wasn't related to th
8
72587
TommyTommy71145049442I'm happy very good site http://www.backup-data.net/index.php/is-cytotec-100-effective cytotec 100 mg einleitung Ministers did not call for a mass walk-out from the court'sjurisdiction, after officials previously said such a proposalwould be on the
9
72588
WaylonWaylon78859444958Withdraw cash http://www.contravision.de/en/ciprofloxacin-online-uk.html buy ciprofloxacin online uk Many buyers have no alternative to FHA, VA or USDA mortgages. First-time buyers in particular often lack the cash for the large downpayments that ot
10
72589
benicar voucherbenicar voucher87430836249kelly services jannsen pharmaceuticals, <a href="https://archive.org/details/GenericEndep10mgWithVisaOnlineNoMembership">benicar 160 mg</a>, [url="https://archive.org/details/GenericEndep10mgWithVisaOnlineNoMembership"]benicar 160 mg[/url], https://a
(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