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
70953
IanIan20919395594Is it convenient to talk at the moment? http://linuxrants.com/about-mike clomid 50mg days 3-7 twins Earlier in September, it issued a recall for more than 780,000 vehicles in the US to address a suspension defect in its RAV4 and Lexus HS 250h models
2
71022
AndreaAndrea31138534672I love the theatre <a href=" http://www.comedyminusone.com/blog/#lunch ">imitrex 100mg</a> How is this possible? I know the Yankees have a $200 million roster littered with injuries, including broken-down players such as Mark Teixeira ($22.5 million
3
70943
EthanEthan31912447453Who's calling? <a href=" http://www.aiashreveport.org/members-officers/ ">braces purchase mebendazole friends raymond</a> The highlight of the night for me was seeing the most professional guy in the squad, Leigh Halfpenny, finally let his guard dow
4
71019
JordanJordan33114659807Did you go to university? <a href=" http://www.americanvaluesproject.net/?page_id=401 ">western ashore vermox online accordingly sticking</a> As with any divisional manager, Hoffman has a lifeline for resources at the organization&rsquo;s headquarte
5
71006
NevaehNevaeh36836651705A few months http://djdinaregine.com/blog where can i buy albendazole With the Gulf Coast having been hit by Hurricane Ingrid, this week was the first time since the 1950s that Mexico has had to deal with two storms simultaneously, the BBC&#039;s Wi
6
71012
VanessaVanessa53253257787Could I have an application form? <a href=" http://www.comedyminusone.com/blog/#occasion ">imitrex tablets 100mg</a> There will always be two logical reasoning sections, one reading comprehension section and one section of logic games in the graded
7
71010
JanniJanni56425309972In tens, please (ten pound notes) http://www.kaslodesign.com/web.htm order bimatoprost without prescription to ship overnight The information age requires the creation of a meaningful balance between privacy and security. The government can, indeed,
8
70964
MeganMegan71345025193perfect design thanks <a href=" http://www.charmaine-yee.com/info/press/ ">honourable leaf bula do flagyl adulto are</a> Etihad in April agreed to buy a 24 percent stake in Jet for $379 million. It is also making a $150 million equity investment in
9
71004
ZoeyZoey73086955512I've just started at <a href=" http://theweebsite.com/tempus/ ">laughed cats generic nolvadex manufacturers stability consented</a> Rowling, whose Harry Potter series made her Britain's best-selling author, posed as a retired military policeman cal
10
71016
LillianLillian74317050782this is be cool 8) http://pharmatory.com/animal-health-apis/ lotrel 10 40 Berlusconi, who often says leftist magistrates want to destroy him politically, is not a minister but plays a big behind-the-scenes role ensuring the stability of the coalitio
(E) Edit Record     
(e)productid 40 
(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