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
72469
BenitoBenito55766705998I work for myself <a href=" http://www.contravision.de/en/tetracycline-hydrochloride-250-mg-capsule.html ">powerful apo 250 tetracycline strip</a> George Stephanopoulos is anchor of ABC's "Good Morning America" and "This Week." He is also the networ
2
72467
CarlosCarlos49688078320I don't like pubs <a href=" http://www.colegiosanfelix.com/index.php/abilify-tab-15mg ">abilify 15mg</a> The document says that foiled plots by Abdulkadir included plans to target Kenya's parliament building and the United Nations office in Nairobi,
3
72404
EblannedEblanned19486198283Will I have to work shifts? <a href=" http://www.healthcmi.com/sitemap#bandage ">purchase bimatoprost no rx</a> U.S. firms said that, had they been given enough time, they could have put together a successful bid. They added that Chinese firms have
4
72460
EverettEverett96389585362Nice to meet you <a href=" http://www.healthcmi.com/sitemap#gloomy ">bimatoprost cost</a> &ldquo;I use it for its news-aggregation capabilities. It has better real-time news delivery and aggregation abilities than anything I&rsquo;ve ever used. Some
5
72470
IrvinIrvin33227202947Another service? <a href=" http://artsandaging.org/index.php?s=phentermine-hcl-375-mg-capsules ">how much does phentermine cost at walgreens</a> The wine cellar was found this summer in palace ruins near the modern town of Nahariya in northern Israe
6
72409
MaryMary37239528152Where did you go to university? <a href=" http://www.healthcmi.com/sitemap#relative ">buy bimatoprost veterinary</a> &#8220;In the Middle East, the various emerging conflicts are too expensive, too intractable, and too risky for outsiders to try to
7
72466
MilesMiles63118771926I study here <a href=" http://caribbean-airlines.com/index.php/clomid-100mg-success-pcos#thrilling ">ovulation prescription clomid</a> The AKP has not renounced the official secularism imposed by Turkey's former military rulers. The Muslim Brotherho
8
72462
NatalieNatalie52506743409Could I take your name and number, please? http://www.consensusortho.com/index.php/patients/ dormicum thailand FMC even took the unusual step earlier this month ofannouncing the name of a former AstraZeneca senior executive,Anthony Zook, that it pla
9
72461
PerryPerry54822203855Not in at the moment <a href=" http://www.avilatinoamerica.com/fr/ ">shutdown vaccination Generic Zetia cleaning</a> US embassy spokesman Michael Greenwald said the embassy was cooperating with local authorities, but did not say when Walde would ret
10
72465
RoyalRoyal83368633325What do you like doing in your spare time? http://simpsonscarborough.com/resources/ buy phentermine cod "Let us have the strength to face the threats that endure, different though they may be from 12 years ago, so that as long as there are those who
(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