Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Dec 2005
    Posts
    702
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Db & Date Questions

    JOIN in an sql select statement is for tables one-to-one relate ?

    How to refer records in a table if private key in not auto-increment but date string ?

    If two private keys may two records have one private key the same ?

    Exist in asp timestamp functionality like php ?

    How I compare Dates below:
    1) get from a form field in format mm/dd/yyyy
    with
    2) dates from Access db table field
    or
    2) dates from MySQL db table field ?

  • #2
    Regular Coder
    Join Date
    Mar 2007
    Posts
    505
    Thanks
    1
    Thanked 19 Times in 19 Posts
    If you are using DATES as your Primary Keys, you need to look into some serious database revisions.

    Primary Keys (PK) are by their very nature UNIQUE, so you can't have 1 date be the same PK on multiple records.

    PHP uses UNIX_TIMESTAMP. ASP, not being built on UNIX, does not use them. You have to do a Google search for ASP UNIX_TIMESTAMP functions.

    As to the rest of your post -- you just asked this in another thread. Look there for the answer.
    To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
    Please, if you found my post helpful, pay it forward. Go and help someone else today.

  • #3
    Regular Coder
    Join Date
    Dec 2005
    Posts
    702
    Thanks
    0
    Thanked 0 Times in 0 Posts
    JOIN statement in an sql select statement is for tables one-to-one relate ?

  • #4
    Regular Coder
    Join Date
    Mar 2007
    Posts
    505
    Thanks
    1
    Thanked 19 Times in 19 Posts
    Sure. You are still JOINing tables together based on 1 field, correct?
    To say my fate is not tied to your fate is like saying, 'Your end of the boat is sinking.' -- Hugh Downs
    Please, if you found my post helpful, pay it forward. Go and help someone else today.

  • #5
    Regular Coder
    Join Date
    Dec 2005
    Posts
    702
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This field must be private key in one and foreign key to other ?

  • #6
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,068
    Thanks
    4
    Thanked 8 Times in 8 Posts
    Actually you can join tables where the column used for the join is a foreign key in both of the tables. Or if the database does not have any foreign keys set up you can still do the join on the tables as long as they will have the same value in each of the columns that you are doing the join on.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •