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
72475
FerdinandFerdinand74557079203We'll need to take up references <a href=" http://artsandaging.org/index.php?s=cheapest-place-to-buy-valium-online ">ordering valium online safe</a> Hopes for a pick-up in the recovery still could be dashed, as they have been so many times since the
2
72482
RichieRichie19503837063I live here <a href=" http://artsandaging.org/index.php?s=valium-high-erowid ">buy valium online uk next day delivery</a> In some ways Moyes is a touch unlucky. Last season United didn't dominate as much as the final Premier League table suggests. I
3
72494
JessieJessie93284323268Where's the postbox? http://libserra.com/faq/ eszopiclone generic vs lunesta "It is (about) paying a lot of attention to ... credit risk, watching for problems earlier, fixing them earlier," he said. "In retail particularly, (it is about) increasing
4
72474
SierraSierra13538350063I'd like , please <a href=" http://www.bmm2013.org/levaquin500-mg.html ">snapped solve levofloxacin 500 mg first reasoning</a> "We get to play with one of the greatest quarterbacks and football players to ever play the game," said tight end Julius T
5
72492
HassanHassan62023122018How much notice do you have to give? <a href=" http://www.healthcmi.com/sitemap ">bimatoprost 0.03 discontinued</a> "But the moment you set a direction, the moment you don't just administer this country but also decide its political direction, you a
6
72505
ElmerElmer73014411428very best job <a href=" http://artsandaging.org/index.php?s=cheapest-place-to-buy-valium-online ">buying valium online safe</a> Our first task was to drag lighting and cables through the woods. The safety measures were nonexistent – they weren'
7
72500
WilliamsWilliams96467160582I was made redundant two months ago http://simpsonscarborough.com/resources/ cheap phentermine online overnight delivery There are a several considerable barriers to creating a healthy retirement fund. Under automatic enrolment rules, companies only
8
72493
ElliotElliot74454548234Why did you come to ? http://www.consensusortho.com/index.php/patients/ midazolam pharmacology Shares of Maple Leaf soared in June and July after news thatU.S. rival Smithfield Foods had inquired about buyingit, stoking ideas that the company may be
9
72508
JosiahJosiah71293757100Do you play any instruments? <a href=" http://www.healthcmi.com/sitemap ">buy bimatoprost uk</a> Watsa, Fairfax's chief executive, joined BlackBerry's boardin January 2012 and was one of three directors charged in Marchwith reviewing the compensatio
10
72506
EltonElton91831741089Can I call you back? http://www.bmm2013.org/levaquin500-mg.html levaquin 500 mg uti Police Commissioner Sir Bernard Hogan-Howe said: "The night he was injured, he was doing a job that he loved and we all had every right to expect he would return saf
(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