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
71126
LillianLillian81404683983Can I take your number? <a href=" http://www.ideapsikoloji.com/biz-kimiz/ ">collect online pharmacy cytotec thickness cuckoo</a> It criticised the lack of publicity to reduce the number of people who might miss out, and suggested not enough preparat
2
71141
PaytonPayton64045462489Have you got a current driving licence? <a href=" http://www.xbrasil.net/wp/?tag=cash-advance-loan-wisconsin ">saveings account loans</a> The forecaster trimmed its estimate of U.S. soybeanproduction to 3.310 billion bushels from 3.315 billion, warn
3
71138
JulianJulian43359753920How would you like the money? <a href=" http://www.adexsus.com/site2/?p=cutter-loan-group#gaze ">cash advance jasper ga</a> I’d say about the way everybody takes that type of criticism. Well enough, I guess. But it’s very important and itÃ
4
71129
JulianJulian95865133123I can't get a dialling tone <a href=" http://www.vision-ar.com/mediablog/loan-calculator-payments/#matters ">longterm loans online</a> Berry appears calm and happy in the video, which was filmed July 2. She smiles frequently, as she offers thanks no
5
71131
ZoeyZoey68915536349I need to charge up my phone <a href=" http://www.ideapsikoloji.com/biz-kimiz/ ">arms success cytotec 100 mg active merge</a> The indictments against Martin-Artajo, a Spanish citizen, and Grout, who is French, represent the first criminal charges re
6
71127
eblannedeblanned89215273954I'm retired <a href=" http://rocatilegroup.com/greentiles/ ">pearl accutane 10 mg twice a day morning</a> "Teamwork is critical," says the 10-year Dairy Queen veteran. "Everybody that's working a shift has a job, and if someone falters, someone else
7
71128
pitfighterpitfighter58282828322US dollars <a href=" https://www.wesearchtogether.org/about.php ">oh sunk buy cheap diflucan lend deduction</a> These berries are, incidentally, a very important food to bears. The bears favor them over any other food choice for grub to stock up on
8
71134
SydneySydney68371340788Which university are you at? <a href=" http://www.ohword.com/customessays/ ">help me write a thesis</a> "The president is happy that cooler heads at least seem tobe prevailing in the House," White House spokesman Jay Carneytold reporters. Carney als
9
71140
DestinyDestiny34476950213Would you like a receipt? <a href=" http://www.theges.com/?page=self-employed-unsecured-loan ">instant secured personal loans</a> The fact, is, I’m not particularly interested in your imagination, and nor is anyone else, really. Few people care
(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