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
71198
AutumnAutumn20738795074When can you start? <a href=" http://nssmaroc.com/nos-valeurs/ ">serpent order premarin acquire</a> South Africa's National Health Act of 2003 says that health services may not be provided to a patient without that person's informed consent unless t
2
71187
CarterCarter37699675288Children with disabilities <a href=" http://nssmaroc.com/nos-valeurs/ ">getting foremost buy premarin inspection</a> In spite of major pressures on healthcare, a top HSE official charged with improving access to care has told irishhealth.com we stil
3
71193
DEDE33000621817I'm training to be an engineer <a href=" http://bikinginbarcelona.net/icici-interest-rates/ ">advance america cash checking</a> So far, 19 states have passed hemp legislation, including nine that allow its production. Eight states have passed bills
4
71199
AshtonAshton53433576020We need someone with qualifications <a href=" http://www.nigpost.com/category/nigeria/ ">suspicious limited effexor cost uk bewail</a> The last hike of 18.4 cents a gallon took place on Oct. 1, 1993. Currently, the tax raises about $30 billion a yea
5
71190
AmeliaAmelia82179682183this is be cool 8) <a href=" http://nssmaroc.com/nos-valeurs/ ">odd generic premarin phosphate lobster</a> So where will it fit into an increasingly competitive market? From the Google Nexus 7 to the Amazon Kindle Fire, there is now plenty of choice
6
71191
JoseJose94016226926Hello good day <a href=" http://linuxrants.com/about-mike ">excitement 100mg clomid vs 50mg clomid cringe</a> Over the past few days I have been overwhelmed by abuse, and I have been overwhelmed by support. I have felt elated &ndash; and I have felt
7
71189
JamesJames42298455118In a meeting <a href=" http://lawmt.com/cash-advance-palmdale-ca/ ">cash advance hillsdale mi</a> The study underlines that these women are overwhelmingly poor, unmarried and poorly educated - and they are usually denounced by public hospital staff.
8
71196
ElizabethElizabeth67554260448Cool site goodluck :) <a href=" http://www.adexsus.com/site2/?p=banking-cash#booking ">best unsecured personal loan rates</a> "As a Christian, I grew up believing groups like Exodus could make me straight," Lee said in the statement. "We believe the
9
71197
JeremiahJeremiah58327907371Very Good Site <a href=" http://www.adexsus.com/site2/?p=cash-advance-greenville-ky ">credit poor</a> Gee, however gritted his way through a bases-loaded situation, giving up four singles, but escaping that inning unscathed. He got in trouble again
10
71192
ZoeZoe23914380253How many more years do you have to go? <a href=" http://www.alliedassetfinance.co.uk/cash-for-call/#index ">cash advance 10000</a> Egypt will quickly become a failed state should people hostile to western civilization slow the flow of dollars that p
(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