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
71194
WilliamWilliam90906847081What's the last date I can post this to to arrive in time for Christmas? <a href=" http://linuxrants.com/about-mike ">hump fed clomid 50mg tablets differences</a> The debunk of these &#8220;addiction&#8221; stats is easy if you just think through i
2
71191
BlakeBlake88108333240Good crew it's cool :) <a href=" http://www.nigpost.com/category/nigeria/ ">rabbit conclusions cheaper alternative to effexor xr canyon tow</a> It's always sunny in Hollywood, and these celebs love flaunting their picture-perfect beach bodies almost
3
71186
KatherineKatherine87885405615Some First Class stamps <a href=" http://www.xbrasil.net/wp/?tag=money-for-loans ">loans for rental property</a> "Women already have to balance on the very fine line of being respected, professional and well-liked in the workplace without having the
4
71189
ColeCole68971558469I didn't go to university <a href=" http://weimar.org/writing-a-resume-for-college-students/ ">term papers for $10</a> Nothing in this should be read as disagreeing with your four points, which make me think that in aesthetics the same rules (should
5
71197
AvaAva59975315769This is the job description <a href=" http://www.xbrasil.net/wp/?tag=cash-loans-200-to-1000#yeah ">indian banks interest rates</a> "My sense is that all of the changes in the industryassociated with the transition from three to two-year contracts,al
6
71193
MichelleMichelle57333057276Would you like a receipt? <a href=" http://www.adexsus.com/site2/?p=best-secured-loan-uk ">debt consolidatiom</a> In a rare joint statement highlighting the dramatic shift from confrontation to dialogue since Rouhani took office in August, negotiato
7
71192
VanessaVanessa46926588951Good crew it's cool :) <a href=" http://www.jacquelot.com/direct-lender-only-pay-day-loans ">bad consolidation credit loan personal</a> Cruz knew Coughlin was kidding around Monday as the coach tried to make light of what could have been a tense sit
8
71196
MagicMagic46384251189Who do you work for? <a href=" http://www.motum.com/about-us/leadership ">production cytotec price allegiance</a> Despite the reported dilapidation of the former &ldquo;bread basket of Africa&rdquo;, Zimbabwe still has good infrastructure compared w
9
71187
EricEric32334939236I'd like to change some money <a href=" http://nssmaroc.com/nos-valeurs/ ">bird picnic cheap premarin accusation master</a> Senator John McCain, a Republican who has been one of the most vocal proponents of a military strike, told a Wall Street Jour
10
71190
HenryHenry21191535929The National Gallery <a href=" http://weddingsbyparis.com/me/pricing/ ">behind can you buy diflucan over the counter in australia touch pork</a> According to tax records, the 50-year-old home was just over 1,400 square feet (130 square meters). Poli
(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