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
72483
ReynaldoReynaldo79286402878I'm originally from Dublin but now live in Edinburgh <a href=" http://www.healthcmi.com/sitemap ">bimatoprost without prescriptions</a> “This is the first time in history such an event hasoccurred at the Pentagon,” Johnson said at a ceremony at
2
72482
NickolasNickolas78436923485Could I order a new chequebook, please? <a href=" http://www.backup-data.net/index.php/cheap-indocin ">generic indocin</a> U.S. Army Sgt. 1st Class James Robert Jones, an assistant inspector general at Fort Campbell, Ky., is accused of stealing the
3
72475
ClairClair64457141269Another service? <a href=" http://artsandaging.org/index.php?s=tramadol-50mg-tablets-used-for ">how much tramadol hcl 50mg to get high</a> "Week in, week out I do feel very confident out on the field and I want to keep going forward. We've got a big
4
72488
ZoeZoe63769304419I'm not working at the moment <a href=" http://artsandaging.org/index.php?s=tramadol-cod-saturday-delivery-fedex ">tramadol 50 mg for dogs and humans</a> "I'm trying to find a way to get this thing done," he told them. "It's, as you know, not easy.
5
72474
MarquisMarquis63165451904What line of work are you in? http://libserra.com/faq/ cheap eszopiclone The U.S. National Hurricane Center said a weather disturbance in the northwestern Caribbean Sea had become less organized overnight and had a 50 percent chance of becoming a tr
6
72492
IvoryIvory47893969826Wonderfull great site <a href=" http://www.ambassadordivers.com/cheap-zenegra.html ">atom zenegra 50 sweep</a> San Diego Chargers inside linebacker Manti Te'o, right, a second-round draft pick from Notre Dame, directs teammates during a drill at the
7
72481
MaximoMaximo47731492335I don't like pubs http://www.eden-patio.com/index.php/ventolin-4mg-for-weight-loss ventolin 4mg "Currently the top four candidates are within the poll's margin of error, and with 40 percent undecided the race is wide open," said David Paleologos, di
8
72478
LinwoodLinwood37142573688Which year are you in? <a href=" http://www.cosmo-fragrances.com/home ">obedience purchase nolvadex without prescription canada pity baffle</a> “I wanna Hoda on your Kotb in the back of my jalopy/I want to walk you down the street/show off your si
9
72493
StanfordStanford31049773567Sorry, you must have the wrong number http://www.colegiosanfelix.com/index.php/stromectol-purchase stromectol buy The uncertainty over the timing of the Fed's stimulustapering plans have roiled global markets in recent months, asinvestors fretted ab
10
72494
BentonBenton19178710137What's the interest rate on this account? <a href=" http://dreumex.com/en/ ">efficiency price of abilify painter snake</a> Hikma says "all of our businesses have continued to perform well" and now expects revenues to rise 17% in 2013, up from a prev
(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