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
72601
DarronDarron58256792686It's a bad line <a href=" http://www.backup-data.net/index.php/1mg-anastrozole#clothing ">arimidex 1mg</a> Former Giants star Tiki Barber has scored a new wife -- and the happy newlyweds aren't afraid to flash some serious bling. Barber hit up Twitt
2
72591
DerekDerek14261175376I love this site http://www.groenservicebvba.be/vibramycin-online vibramycin 50mg The proposal to be discussed Friday by the OPCW would allow inspectors into any site suspected of chemical weapons involvement even if Syria's government did not ident
3
72595
JuliaJulia99678752961Where are you from? http://www.contravision.de/en/buy-generic-flomax.html flomax generic cost Russia so far has sidestepped the issue by claiming that it cannot take action on Snowden because his presence in the transit zone puts him technically out
4
72596
namename76112577371"I do agree with all the ideas you have presented in your post. They are very convincing and will definitely work. Thanks for the post."
5
72592
SamualSamual90890890143I enjoy travelling <a href=" http://www.alamotravel.com/macrobid-vs-macrodantin ">macrobid 100mg</a> Hanover said many of the dancers "love the Giants" and many of the team's athletes go to the club, but "Rick's is about having a party all the time.
6
72600
SheldonSheldon84261711088How long have you lived here? http://www.aitvm.org/aitvm.org/index.php/clotrimazole-and-betamethasone-dipropionate-cream betamethasone cream 0.05 buy "In the end if Letta is able to get a short-term agreement, if he is able to postpone elections for
7
72599
StevenSteven78480372672i'm fine good work http://caribbean-airlines.com/index.php/yaz-drospirenone cost of yasmin “We are capable of doing a good job of controlling lionfish at diveable depths, in shallower areas. Divers and spearfishers can go in and remove the fish. B
8
72598
ThanhThanh55965980193We need someone with qualifications <a href=" http://www.bmm2013.org/order-nizagara.html ">nizagara tablets india</a> Osborne said: "We know every penny counts for hard-working people. But by themselves these changes don't amount to an economic poli
9
72593
TommieTommie59530195087History http://www.eden-patio.com/index.php/quetiapine-fumarate-tablets seroquel xr quetiapine fumarate extended release tablets BAGHDAD (AP) — A wave of coordinated blasts that tore through overwhelmingly Shiite cities shortl
10
72597
ZacheryZachery50326381537How many more years do you have to go? <a href=" http://www.bmm2013.org/order-nizagara.html ">nizagara dosage</a> Bulik planned to wed her boyfriend of six years, Jeff Lang, in a small ceremony. With less than two weeks to get ready, Bulik was going
(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