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
71071
JustinJustin63292179791What sort of work do you do? <a href=" http://weddingsbyparis.com/me/prici ">diflucan compresse costo im</a> Revlon is searching for a new chief after announcing lastweek that David Kennedy, the company's vice chairman and formerchief executive, had
2
71072
Growth Hormone To Get TallerGrowth Hormone To Get Taller123456yturdkvsjtufdiopmphjft, <a href="http://rehgh.com/GrowthSteroids/Growth,Hormone,To,Get,Taller">Growth Hormone To Get Taller</a>, ovDYWxX, [url=http://rehgh.com/GrowthSteroids/Growth,Hormone,To,Get,Taller]Growth Hormone To Get Taller[/url], ehSSTOF, h
3
71010
DestinyDestiny19188801024What's the last date I can post this to to arrive in time for Christmas? <a href=" http://buffalonavalpark.org/cash-advance-chilliwack/ ">i was denied a payday loan</a> The defaults and losses imposed on bondholders are on ascale not seen since the
4
71012
AlexanderAlexander81020535933I'm not working at the moment http://www.cipmausa.org/index.php/syllabus imitrex 50 mg recommended dosage The Apple products targeted by the ITC ban are more than a year old, though some models such as the iPhone 4 remain solid sellers. Apple sells
5
71040
JanniJanni57423217513Could I take your name and number, please? <a href=" http://holocaustchildren.org/articles ">site buy methocarbamol ship</a> China, the world's fourth-largest oil producer andsecond-biggest importer, has also managed to maintain output ataging onsho
6
71006
ArianaAriana78943012008Children with disabilities http://www.cipmausa.org/index.php/syllabus imitrex 50 mg tablets price U.S. Bankruptcy Judge Steven Rhodes is to rule on whether Detroit is eligible for Chapter 9 protection in a trial to begin on October 23. Orr expressed
7
71061
BlakeBlake29601900279I can't get a signal <a href=" http://newenglandallergy.com/pollen ">where can i buy diflucan pill hg</a> "Every 15 days we are going to hold auctions and it is possible that morethan $200 million will be sold at each one," Merentes told reporters i
8
71066
freelovefreelove69515408612I'm not interested in football <a href=" http://purplenetwork.co.uk/SEO.html#thank ">buy indocin 75 mg</a> Pint-sized 'Jersey Shore' star, Snooki, has confirmed that she is pregnant and engaged. It looks like Jionni may be making an honest woman out
9
71064
MichelleMichelle89829988980Have you got a current driving licence? http://www.cipmausa.org/index.php/syllabus imitrex 50 mg recommended dosage It is doubtful the Panama authorities had the technology to know the N. Korean ship was carrying weapons. American spies, perhaps wit
10
71063
AydenAyden64487620325What company are you calling from? <a href=" http://gbxemu.com/nds-lite/ ">pastillas dostinex cabergolina 0.5 mg</a> Cambodians vote Sunday in the country's fifth general election since 1993, when the United Nations helped stage the nation's first f
(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