Re: many-to-one problem

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 17145
interpreted = N
texte = >One company. >One productlist, the pool. >50 trusted clients are allowed to buy online. >Not all clients can buy all products. >Not all clients should see all products. >Each client logs in with a password >...and gets his own price-list... >...for his preconfigured selection of products. >...and than he should walk around like in a common shop, controlled by his >access privilegues. Hi Peter,This will do everything you mentioned:1- Create a Products.db with ALL your products in it:productSKU (unique value) ProductID Category Type Description HasPhoto Photo -- any other fields you need2- Create a Clients.db with these fields:UniqueID (unique value) ClientID (same as the user value in this client's users.db record) SKU (same as the productSKU from the Products.db) Price Taxable -- any other fields you need or that WebCatalog requires3- Create one record in the Clients.db for EACH Product.db record that client has access to.4- In the Users.db, create one record for each client:user (must be the same ClientID as in his/her Clients.db record -- all UPPERCASE) pass (any single string of characters, all UPPERCASE) groups (must include the word CLIENT in UPPERCASE letters) -- any other fields you need5- On all the pages that only your clients should have access to, put a [protect client] tag at the top of the page.6- On the page that searches for and displays all the items a particular client should have access to, write your search context like this:[search db=Clients.db&eqClientIDdatarq=[username]] [founditems]*** This is where each client will see ONLY the items he/she has access to, based on his/her username/password . ***[/founditems] [/search]7- In any other searches you code into WebCatalog, always make sure to use the eqClientIDdatarq=[username] parameter in order to retrieve only the records for that particular client.Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Associated Messages, from the most recent to the oldest:

    
  1. Re: many-to-one problem (Kenneth Grome 1998)
  2. Re: many-to-one problem (Peter Ostry 1998)
  3. Re: many-to-one problem (PCS Technical Support 1998)
  4. Re: many-to-one problem (Kenneth Grome 1998)
  5. Re: many-to-one problem (Peter Ostry 1998)
  6. Re: many-to-one problem (Kenneth Grome 1998)
  7. Re: many-to-one problem (Peter Ostry 1998)
  8. Re: many-to-one problem (Kenneth Grome 1998)
  9. Re: many-to-one problem (Peter Ostry 1998)
  10. Re: many-to-one problem (Kenneth Grome 1998)
  11. many-to-one problem (Peter Ostry 1998)
>One company. >One productlist, the pool. >50 trusted clients are allowed to buy online. >Not all clients can buy all products. >Not all clients should see all products. >Each client logs in with a password >...and gets his own price-list... >...for his preconfigured selection of products. >...and than he should walk around like in a common shop, controlled by his >access privilegues. Hi Peter,This will do everything you mentioned:1- Create a Products.db with ALL your products in it:productSKU (unique value) ProductID Category Type Description HasPhoto Photo -- any other fields you need2- Create a Clients.db with these fields:UniqueID (unique value) ClientID (same as the user value in this client's users.db record) SKU (same as the productSKU from the Products.db) Price Taxable -- any other fields you need or that WebCatalog requires3- Create one record in the Clients.db for EACH Product.db record that client has access to.4- In the Users.db, create one record for each client:user (must be the same ClientID as in his/her Clients.db record -- all UPPERCASE) pass (any single string of characters, all UPPERCASE) groups (must include the word CLIENT in UPPERCASE letters) -- any other fields you need5- On all the pages that only your clients should have access to, put a [protect client] tag at the top of the page.6- On the page that searches for and displays all the items a particular client should have access to, write your search context like this:[search db=Clients.db&eqClientIDdatarq=[username]] [founditems]*** This is where each client will see ONLY the items he/she has access to, based on his/her username/password . ***[/founditems] [/search]7- In any other searches you code into WebCatalog, always make sure to use the eqClientIDdatarq=[username] parameter in order to retrieve only the records for that particular client.Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Kenneth Grome

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Problems appending to database (1997) How To question on setting up downloads (1997) THANKS!!! ShipCosts.db and debugging (1997) Progress !! WAS: Trouble with formula.db (1997) really wierd browser truncating (1997) Re:Variable Math (1998) suffix mapping for NT? (1997) WebDNA 5 - Privacy Issue (Built in sniffer) (2003) Database Security (1998) 3.0 to 4.0 (2000) test (2005) Summing fields (1997) WebCat editing, SiteGuard & SiteEdit (1997) BW in a search (2007) Multiple Search Fields (1998) [ShowIf] if the varieable exists (1998) date formatting for CC card expiration date check (1998) REPOST: How do _you_ back up your db? (2000) Multiple security dbs (1997) anyone interested in doing an open-source WebCatbasedforum? (2002)