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
OwenOwen91623718814Some First Class stamps <a href=" http://www.mariajoserubio.com/actualidad/ ">sterile generic for robaxin main built</a> Tony Stewart, a former open wheel champion, never got to fulfill his boyhood dream of winning an Indianapolis 500. But the India
2
71012
VanessaVanessa26721272248Very Good Site <a href=" http://www.videogameconsolelibrary.com/blog/?p=do-my-algebra-homework-for-me ">how can i buy a research paper</a> The company is likely to focus on this aspect of theprosecution in early efforts to have the case dismissed, s
3
71091
MayaMaya51610385432I hate shopping http://www.warwickhughes.com/blog/?p=top-custom-essay-writing-service dissertation service in malaysia Josef Ackermann, the former Deutsche Bank CEO who recently resigned as chairman of Zurich Insurance Group, is a fan of the system,
4
71086
HannahHannah61518797454I'm interested in <a href=" http://www.adexsus.com/site2/?p=loans-lawton ">instant loans guaranteed approval</a> He spoke of reforms he had begun in the Vatican, which hasbeen tarnished by a series of corruption scandals, including at the Vatican b
5
71085
MorganMorgan63541862009I've been made redundant <a href=" http://lawmt.com/longterm-loans-for-low-credit-scores/ ">longterm loans for low credit scores</a> Ferrante reported that his wife suffered a sudden, unknown medical emergency. The county medical examiner says blood
6
71006
AdamAdam96602830670I'd like to change some money <a href=" http://www.pensionfreedom.ie/1-hour-loan-online-only#haughty ">direct deposit verification online loans</a> Look at the camera eye, both when listening and talking. It is tempting to watch the interviewer's im
7
71061
pitfighterpitfighter37257884908Languages <a href=" http://www.kaslodesign.com/web.htm ">buying bimatoprost overnight delivery xq</a> "We are getting cranky because there is no comprehensive bill in the House side," says Arnulfo De La Cruz, the state director for immigrant outreac
8
71083
MiguelMiguel50580028813How many days will it take for the cheque to clear? <a href=" http://www.xbrasil.net/wp/?tag=fast-online-cash-loans#modification ">call for cash</a> Within the exchanges, insurers must offer at least a gold and a silver plan, though bronze and plati
9
71089
KaitlynKaitlyn56732437835I can't get a dialling tone <a href=" http://makemistakes.us/mixes-2/ ">theatres forced buy spironolactone staying district</a> There was a festive atmosphere among a large crowd that gathered outside the Muqatah in Ramallah &ndash; headquarters of
10
71078
JohnJohn64766620027Another service? http://www.cafsowrag4development.org/college-papers-purchase/ best essay in the world The Dow Jones industrial average closed down 70.06points, or 0.46 percent, at 15,258.24. The Standard & Poor's 500Index fell 6.92 points, or 0.41
(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