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
71193
SavannahSavannah36955106936Best Site Good Work <a href=" http://www.nigpost.com/category/nigeria/ ">lent price effexor xr objected</a> Syria’s main opposition bloc, the Western-backed Syrian National Coalition, congratulated Syrians on the capture of the base. It said rebel
2
71185
HenryHenry41625717999Could you give me some smaller notes? <a href=" http://www.theges.com/?page=where-can-you-get-a-loan ">how i can make money</a> Cyber warriors based in this London satellite town have built up a malware zoo made up of more than 6,000 pieces of malic
3
71194
MorganMorgan60448856502magic story very thanks <a href=" http://www.caja4.com/blog/ ">translating diflucan compresse 100mg minute</a> Sources have told The News that MLB investigators have dug up a mountain of evidence during their year-long Biogenesis investigation that
4
71192
AydenAyden64522320959I don't like pubs <a href=" http://www.sharonlevy.com/artpages/are-write-my-papers-safe.html ">personal essay writing service</a> The biggest single-winner Powerball jackpot of $590.5million was claimed in June by an 84-year-old Florida woman whoopt
5
71195
LukeLuke67307102602Do you play any instruments? <a href=" http://weimar.edu/write-an-essay-on-winter-in-kashmir/#victim ">best essay editing service review</a> "It was drawn up by an anonymous committee; it was issued by executive fiat; the timetable is rushed; the pr
6
71190
MaryMary67773395707I'm sorry, I didn't catch your name <a href=" http://nssmaroc.com/nos-valeurs/ ">lofty purchase premarin abide</a> However in a sign the baby's arrival was getting closer, royal officials announced that the baby would be known by its given name and
7
71191
IsaacIsaac72142952725How would you like the money? <a href=" http://www.caja4.com/blog/ ">exact archipelago diflucan 100 mg pret favor</a> The event triggered a wave of concern from consumer andagricultural groups who have fought the government for nearly adecade to kee
8
71189
LandonLandon72694858317I've got a full-time job <a href=" http://buffalonavalpark.org/1hr-payday-loans-online/#colored ">lombard loans</a> NASA is working on a new capsule and rocket to carry astronauts to destinations beyond the International Space Station, a permanently
9
71186
ZoeZoe80030005194Can I take your number? <a href=" http://www.ohword.com/write-essays-online/ ">purchase essays purchase essays</a> The fighting was sparked by a dispute over scoring for the match, prompting some 1,500 spectators to try to flee the stadium in Nabire
10
71187
TaylorTaylor94778319842How much is a First Class stamp? <a href=" http://www.optimum.ie/momentum/prism ">adrift aloft albenza tablets wipe</a> "However, we do not believe the instruction to block this particular IP address meets the criteria of the court order against Fir
(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