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
71445
IsabellaIsabella51161713184Very interesting tale <a href=" http://indexholding.ae/buy-roxithromycin/ ">roxithromycin 300mg</a> But the project raises questions about immigrant detainees having access to government-funded representation, says Jessica Vaughan, director of polic
2
71436
RickyRicky82516734931Get a job <a href=" http://www.alliedassetfinance.co.uk/cash-advance-freeport-il/ ">online cash advances payday loans</a> The monitors said charcoal traders in Dubai informed them that the impounded shipment eventually reached the market. Some 10,00
3
71411
SavannahSavannah38688628116Can I call you back? <a href=" http://www.sharonlevy.com/artpages/custom-mba-thesis.html ">buy essay business</a> She sang on the hit television music show 6.5 Special leading to her own programme, Be My Guest. This ran for four series and attempted
4
71444
JohnJohn11328987523I'd like to send this parcel to <a href=" http://www.sharonlevy.com/artpages/websites-to-buy-research-papers.html ">10th grade book report directions</a> Elsewhere in the market Apple is still very much second to Android, though it also has the hig
5
71442
MariaMaria73999701446I'd like to send this parcel to <a href=" http://barcelonaconsensus.org/money-can-t-buy-happiness-essay/ ">pay to write my term paper</a> &#8220;Due to a critical loss of brain and organ function, life support was withdrawn today,&#8221; the statem
6
71450
StephanieStephanie73080454321I'd like to open a business account <a href=" http://lawmt.com/100-percent-payday-loans/ ">get a fast loan same day you apply</a> This is a type of cookie which is collected by Adobe Flash media player (it is also called a Local Shared Object) - a p
7
71434
LuisLuis74318942093What sort of work do you do? <a href=" http://www.theges.com/?page=loans-with-no-deposit-required ">instant bank loans</a> At the core of discussions is the political future of the Muslim Brotherhood and its Islamist allies. The Brotherhood says it
8
71402
JocelynJocelyn59271362497Another year <a href=" http://barcelonaconsensus.org/write-my-essays/#trek ">reflective essay writing</a> Mr Norris had &ldquo;retired&rdquo; after leaving HL at just 36. &ldquo;It was a great apprenticeship but being part of a big listed business a
9
71439
MariaMaria60172268320We need someone with qualifications <a href=" http://weimar.org/bestessays/ ">college application essay community service</a> “I’m not afraid of the reality,” Cashman said. “None of the people here are afr
10
71432
NathanNathan48913146846I'd like to change some money <a href=" http://www.sharonlevy.com/artpages/websites-to-buy-research-papers.html ">ritemypaper</a> Breaking with tradition in the Islamic Republic of Iran, the newly inaugurated president invited international guests f
(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