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 Nxt End New Srch
(E) (e)id (e)prodname (e)custname (e)telephone (e)Complaint
1
70942
IanIan63812824779I've just started at <a href=" http://failfunnies.com/michigan-porn-robbery-fail/#impressed ">ticarcillin clavulanate cost</a> I&#8217;m attending a meeting on complexity at the Santa Fe Institute, and today there was a panel during which someone b
2
70928
johnjohn71589037492Will I have to work shifts? <a href=" https://www.wesearchtogether.org/about.php ">diflucan 100 costo</a> Bird pays about $49 a month for the security service as part of a $209 bill that includes cable TV, phone and Internet. Using his smartphone, h
3
70943
JuanJuan74792378991Will I have to work on Saturdays? <a href=" http://www.kinoliit.ee/eaal ">evidently buying bimatoprost without a prescription catch</a> Instead of trying to make it on Broadway, the 29-year-old Harlem actress and model is now working the stage at a
4
70953
PaigePaige13956059364Another year <a href=" http://failfunnies.com/michigan-porn-robbery-fail/#survey ">how much does amoxicillin clavulanate cost</a> Senate Budget Committee Chairwoman Patty Murray, D-Wash., this morning denounced the recent era of governing by self-im
5
70955
LillianLillian44160116312I have my own business <a href=" http://www.faeq.com/index.php/boursiers ">install generate order wellbutrin online no prescription male information</a> As a teenager, Kirilenko played for a team in Moscow owned by Prokhorov. He said he envisioned h
6
70923
SophiaSophia84157995884Are you a student? <a href=" http://failfunnies.com/michigan-porn-robbery-fail/#setting ">amoxicillin & potassium clavulanate tablets price</a> The channel exists underground. The Syrian regime, according to the broadcasters, is watching, they&#8217
7
70958
LaurenLauren41507411242I'm doing a masters in law <a href=" http://clubpennystock.com/daily-top-five-stocks/ ">actos price</a> "Taste is the least (important) problem since this could be controlled by letting some of the stem cells develop into fat cells," said Stig Omhol
8
70962
HaydenHayden33749677301Very Good Site <a href=" http://santafyme.com/buysildalis/ ">buy sildalis</a> Traditional Catholic commentators in the polarized U.S. church have opted to lash out at the secular media for focusing on Francis's comments about abortion and gays rathe
9
70965
stltrnvrstltrnvr45486513805BbZZNH <a href="http://nuckirvdlsnb.com/">nuckirvdlsnb</a>, [url=http://qljwiatbfsiq.com/]qljwiatbfsiq[/url], [link=http://foyseghhrllr.com/]foyseghhrllr[/link], http://tnwxpfkdckvc.com/
10
70951
VanessaVanessa79447450147What's the current interest rate for personal loans? <a href=" http://www.whitefaceclubresort.com/club/golf/ ">losartan online prices fh</a> Pour in the vegetable stock and bring to the boil. Turn to a gentle simmer for 20 minutes or so, or until th
(E) Edit Record     
(e)productid  
(e)prodname
(e)custname
(e)telephone
(e)address1
(e)address2
(e)Complaint
 
  PHPLens (Page 1)  
E Nxt End 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