Current location: Hot Scripts Forums » Programming Languages » PHP » registration of prodid,name,and 2 dates pr. month


registration of prodid,name,and 2 dates pr. month

Reply
  #1 (permalink)  
Old 01-31-04, 10:56 AM
ropey ropey is offline
New Member
 
Join Date: Jan 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
registration of prodid,name,and 2 dates pr. month

Hi,

im not able to understand the logic to get this script working.

What i want is the following:
-being able to put in a customer ID which gets all needed info, like ID, Name and dates registrered.
- Registration of a customer ID + name
- being able to put in 2 dates for every month (lets call it for ex. under januari, date1 and date2, for registration of certain activities)
- option to edit all of those field
- option to delete.

I was working with Dreamweaver mx 2004 to get this working, but think i have to go for plain mysql commands to insert and extract the data.

in the mysql database i have 1 table called 'produsent'
and the rows:
- prod_pk (holds the primary key)
- prodid (customer ID)
- prodnavn (customer name)
also 2 rows called:
- dato1 (date for field 1)
- dato2 (date for field 2)
but don't know if this logic works, as i want to be able to put in 2 dates for each month, which proberbly will mean that i will need 24 date fields.

please take a look here, i created this screenshot so hope you understand what i mean:
http://www.nhin.no/prod/images/proddates.gif

maybe somebody allready has a simple existing script which looks like it and i could customize.

Ropey
Reply With Quote
  #2 (permalink)  
Old 01-31-04, 11:52 AM
blaw's Avatar
blaw blaw is offline
Junior Code Guru
 
Join Date: Dec 2003
Location: Vancouver, BC, Canada
Posts: 550
Thanks: 0
Thanked 0 Times in 0 Posts
Hello,

Will there always be two and only two (not one, not three, etc) dato fields per month per customer? Do you have to be able to know the last year (or year before the last, etc)'s dato fields? Is it crucial to distinguish dato1 and dato2?

If the answers to the above are all yes, you may as well have 24 dato fields per customer, but otherwise, you might want to indtroduce another table to store dato fields. Primary Key for this table will be a combo of dato and CustID.

Hope this gives you some idea.
__________________
Blavv =|
Reply With Quote
  #3 (permalink)  
Old 01-31-04, 12:12 PM
ropey ropey is offline
New Member
 
Join Date: Jan 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
You should have the option to fill out 2 dates, it will never be more than 2, but it could be 1 first and a week later we put in another date in date2 field when a 'project/registration' is finished.

beside all of this, i need to be able to check whether 2 fields for a specific month are filled out or not,
if not 2, than i want all of those (missing ones) in a report.

Everything should not only be for the year 2004 but also be able to specify which year (2004, 2005, 2006 etc.).

Ropey
Reply With Quote
  #4 (permalink)  
Old 01-31-04, 01:12 PM
blaw's Avatar
blaw blaw is offline
Junior Code Guru
 
Join Date: Dec 2003
Location: Vancouver, BC, Canada
Posts: 550
Thanks: 0
Thanked 0 Times in 0 Posts
Hi there,

If you need to keep track of more than one-year portion of months, definitely, separate these fields from the main table - otherwise you would have to be adding 24 more fields, not records, at the beginning of each year, which is not fun nor efficient.

By separating these dato fields into another table, you can still search for all the customers that do not have 2 records(dates) in a specific month, etc.

I'll reply to your PM now.
__________________
Blavv =|
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
50mb Space+ 1gb Bw+ mysql.. =$9 per year (first month free without any payments) dolay General Advertisements 1 01-18-04 10:53 AM
Important:50% off discount - web hosting from $2.08 / month and resellers from $9.95 HarveyHosting General Advertisements 0 01-02-04 06:24 PM
Tremendous Hosting Sale! Accounts from $2.95 and one month FREE! jmanns General Advertisements 0 11-05-03 07:40 AM
How to find the difference between two dates and make multiple inserts based on it? wyseguy ASP 1 10-08-03 11:53 AM
looking for class registration script KingSky PHP 4 06-27-03 01:44 PM


All times are GMT -5. The time now is 08:13 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.