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
71453
MeganMegan28752832280Have you got any experience? <a href=" http://weimar.edu/custom-essay-writers/ ">waited peper help org tempted</a> Officials from the two countries discussed international lawand practices in cyberspace at low-level talks on Monday. Cybersecurity wi
2
71452
ZacharyZachary52469695735very best job http://barcelonaconsensus.org/do-my-homework-for-cheap/ help with c homework But the Cashman comment that made me believe the Yankees are not going to haggle with Girardi — and will instead attempt to get to a dollar figure that s
3
71411
HaileyHailey45623195527Pleased to meet you <a href=" http://www.cafsowrag4development.org/best-writing-service-websites/#male ">mba essay writing services india</a> China accounts for between 50 percent and 80 percent of IPtheft suffered by U.S. firms, the Commission on t
4
71444
CharlesCharles91885605786Insufficient funds <a href=" http://www.greatnoiseensemble.com/hydrocodone-side-effects-of-withdrawal/ ">order hydrocodone ship overnight</a> But AAA says lower fuel prices may not spur as much road traffic as some might expect. In fact, during the
5
71442
WyattWyatt72702532000How would you like the money? <a href=" http://buffalonavalpark.org/redleaf-loans/#europe ">instant cash services</a> Facebook had easier options that it could have considered beside launching its own mobile app. Yet it pursued that path. Producing
6
71456
KatherineKatherine73605478488Please call back later <a href=" http://barcelonaconsensus.org/top-custom-essay-writing/ ">basket postage write my essay canada suit</a> Silent Circle, in a letter to its customers, cited Lavabit’s decision. “We see the writing the wall, and we
7
71457
razer22razer2249173621697I'm not working at the moment <a href=" http://www.cornwallfoodanddrink.co.uk/buy-essay-10800/ ">law essay assignment help toronto ontario</a> "We don't want to speculate, but at this stage we do not think there is any such link," he told Reuters. "
8
71439
MadelineMadeline95442359050Through friends <a href=" http://www.videogameconsolelibrary.com/blog/?p=writing-essay-introductions ">speech writing help</a> "If Ralph thinks it's needed, God bless him. This is America," he said. "I'll personally find it amusing the first time hi
9
71432
TaylorTaylor31748731832I'm afraid that number's ex-directory http://www.sharonlevy.com/artpages/effective-report-writing.html thesis writing services uk He fled the oil-rich Central Asian state after BTA, the bank he once controlled, was nationalized and declared insolven
10
71459
EmilyEmily82107495883Do you know each other? http://barcelonaconsensus.org/do-my-homework-for-cheap/ writting essay for pay Sources at the meeting said Germany was less assertive thanpreviously in seeking binding targets to reduce borrowing tofollow on from a deal stru
(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