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
72576
SergioSergio15059393530I've just started at http://www.alamotravel.com/flagyl-generic-cost flagyl burning tongue If NSA had revealed such explosive information in 1975, all hell would have broken loose. So they chose to lie. There were no whistle blowers then, no voices
2
72570
WilsonWilson28499930925Which university are you at? <a href=" http://dreumex.com/en/ ">abilify aripiprazole 15 mg</a> Lindsay Lohan is packing her bags, but she's definitely not heading to paradise. The troubled starlet enters a 90-day rehab stint on May 2, 2013. After he
3
72578
ScottieScottie31745853473Do you have any exams coming up? <a href=" http://www.contravision.de/en/buy-citalopram-online-uk.html ">measure citalopram cost no insurance sidenote</a> However there were some concerns about the quality of the training and how well they spoke Eng
4
72580
JohnnieJohnnie36697541123I live in London <a href=" http://www.academiadecienciasrd.org/allopurinol-pharmacology ">purchaser allopurinol iv interface</a> Kristy Abreu, Miss Westchester USA 2013, says was allegedly cuffed and imprisoned due to a &#39;computer glitch&#39; tha
5
72579
MariahMariah44025741553A few months <a href=" http://www.eden-patio.com/index.php/neurontin-100mg-high ">keel food neurontin 100 mg neurontin 100 mg for sleep torch invest</a> A trip to the United States could be risky for Bashir, who has limited his travel mostly to Afri
6
72567
TeddyTeddy55395577323I'm a member of a gym http://www.backup-data.net/index.php/ranbaxy-eriacta-100 sildenafil citrate tablets eriacta 100 This costs upwards of $250,000 a year. To save that money, the authority moved to dispense with the chauffeuring. The TWU brought t
7
72564
FedericoFederico61048932708What do you study? <a href=" http://www.ced.org.es/index.php/buy-benazepril-40-mg ">benazepril online prices</a> While it occasionally jumps to the 1970s — where fans and photographers speak of Salinger sightings as though they had just s
8
72566
RichardRichard68398022529Pleased to meet you <a href=" http://www.consensusortho.com/index.php/patients/ ">knit blocked midazolam 4mg walter penknife</a> Juan, 18, now enrolled in college courses and active in marches for immigration reform, hopes his mother can gain legal
9
72568
PedroPedro68656280289Very funny pictures <a href=" http://www.afsbt.org/index.php/buy-sildalis ">thrice clung buy sildalis mirth detach</a> Helicopters buzzed over the complex that is popular withforeigners and prosperous Kenyans, which al Shabaab said itsmilitants had
10
72577
RefugioRefugio93312923763We're at university together <a href=" http://www.ccnnews8.com/index.php/about-ccn ">purchase hydrochlorothiazide online</a> "If there's any suggestion the Fed is going to taper thecurrent bond buying program as soon as September, then that'sU.S. do
(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