View Full Version : Db & Date Questions
07-27-2007, 05:12 PM
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
2) dates from Access db table field
2) dates from MySQL db table field ?
07-27-2007, 06:37 PM
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.
07-28-2007, 10:50 AM
JOIN statement in an sql select statement is for tables one-to-one relate ?
07-28-2007, 03:23 PM
Sure. You are still JOINing tables together based on 1 field, correct?
07-28-2007, 04:06 PM
This field must be private key in one and foreign key to other ?
07-29-2007, 06:18 PM
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.