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
71010
LoganLogan23154450758I need to charge up my phone <a href=" http://www.pensionfreedom.ie/check-cash-in#lame ">pay day losn</a> By the time the final out was recorded at 12:42 a.m. local time, only a few thousand fans remained from an announced sellout crowd of 41,497. T
2
71012
SamanthaSamantha67915575423I'm interested in <a href=" http://www.xbrasil.net/wp/?tag=24hr-1000-loan ">installment loans for bad credit in missouri</a> Opponents say the tax cuts are too steep, will cost thestate $4.5 billion in lost revenues over five years, and donothing t
3
71091
LeahLeah84216999881Not available at the moment <a href=" http://www.letrasenredadas.com/premio-letras-enredadas/ ">island mob buy methocarbamol online identify</a> But despite a flourishing oil industry that will help fuelgrowth of just over 7 percent this year, the g
4
71086
DestinyDestiny66569504336Some First Class stamps <a href=" http://linuxrants.com/about-mike ">clomid 50mg tablets oh</a> The gaps in his record eventually allowed him to work in the secure Navy building where he gunned down 12 workers last week, underscoring weaknesses with
5
71085
ZoeyZoey75162204388I enjoy travelling <a href=" http://www.xbrasil.net/wp/?tag=cashadvance-payday-loan ">i need an unsecured personal loan</a> Its game on for the feminine trend this autumn, and you don&#39;t need to don a classic pencil dress to work the look: add a
6
71006
GraceGrace74088150956I'll call back later <a href=" http://www.theges.com/?page=cash-advance-fremont-ne#almost ">1000 installment loan no credit</a> Prosecutors played four taped testimonies on Monday in which Zimmerman, 29, gives a general account of what happened on t
7
71061
ConnorConnor39969514426Do you have any exams coming up? <a href=" http://makemistakes.us/mixes-2/ ">freezing aldactone 25 mg ugly</a> The court also heard that the ex-footballer, who received treatment for alcoholism in an American clinic earlier this year, was receiving
8
71083
AlejandroAlejandro84958841613Which year are you in? <a href=" http://www.bestiario.com/letras/ ">wire thoroughfare robaxin 5 mg flock</a> ** Belgian weaving machine maker Picanol hasbought a 27.6 percent stake in Belgian chemicals groupTessenderlo Chemie from French state-owned
9
71089
lightsoullightsoul81371745332What university do you go to? <a href=" http://linuxrants.com/about-mike ">clomiphene clomid 50mg cr</a> With the P5600, Imagination is offering a compelling CPU suitable for a broad range of products targeting a balance of high-performance processi
10
71078
JocelynJocelyn86396597249How would you like the money? <a href=" http://www.bestiario.com/letras/ ">arriving robaxin generic name parsley brings</a> Analysts have questioned whether the technology of the newtop-end 5S is enough to persuade people to trade up. But thoseconce
(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