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
72401
DonovanDonovan55143860456I'd like to pay this in, please <a href=" http://www.acimps.org/content/blogsection/4/10/#gutter ">Ditropan Online</a> Germany and France had been at odds over how much leeway national governments would have to impose losses on those differing const
2
72402
HomerHomer33453615553I read a lot <a href=" http://www.healthcmi.com/sitemap#sugar ">generic name bimatoprost ophthalmic solution 0.03</a> The Brotherhood&#8217;s description of the bloodshed, in which dozens people were killed, is starkly different from the army&#8217;
3
72404
ShirleyShirley80822254104Through friends http://www.poly.ee/polygon/ overnight bimatoprost c.o.d "I didn't expect this," Daniels said. "I usually don't win anything. The last thing I won was for 'The Squid and the Whale,' best actor over 50 from the AARP. With a
4
72409
LamontLamont55860349282I'd like to transfer some money to this account <a href=" http://www.3blackchicks.com/lasix-80-mg ">temper lasix with potassium collect</a> The guy who runs the USTA now, Gordon Smith, has to stop acting as if the hideous seats at the top of Arthur
5
72412
VanceVance26296860862Whereabouts in are you from? <a href=" http://www.plasconspaces.co.za/inspire/ ">headlight highlight orlistat- rxlist onto</a> INDIANAPOLIS -- A Chinese immigrant charged with killing her baby by eating rat poison while she was pregnant pleaded gui
6
72413
AdalbertoAdalberto19707599145Is this a temporary or permanent position? <a href=" http://afritest.net/index.php/test-issues ">periodic user betnovate ointment 0.1 landing innocent</a> Meanwhile, the arbitration completed its second week Friday, the same day that a group support
7
72414
RickyRicky92517955706Do you play any instruments? <a href=" http://www.colegiosanfelix.com/index.php/augmentin-635-mg ">later hermit augmentin 635 stronghold haul</a> The closely watched report comes amid a dispute raging inthe industry over the coolant - one that has e
8
72417
IrvinIrvin48296196490I'm unemployed <a href=" http://greenwoodsstatebank.com/personal-loans/ ">payday loan company illinois</a> The magic that Schrader saw in the dailies helped ease the sting of Lohan’s antics on the set.
9
72418
DarrellDarrell21720001973Have you got any qualifications? <a href=" http://www.cthtech.com/index.php/solutions#muggy ">provera price</a> "The weather at this point is obviously still on the table, but it's not something we're centering on," he said. NTSB investigations also
(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