#mysql - Mon 12 Mar 2007 between 00:00 and 00:12

NY Lost Funds



chadmaynardhe's saying you could have a table with three fields CREATE TABLE user (id int(5), username VARCHAR(50), password VARCHAR(50), is_customer bool() );
asdxthats why im asking
chadmaynardlike that mayebe
maybe
asdxi see
chadmaynardwhere you could SELECT * FROM users WHERE is_customer=1, etc
normalization
the_wenchhttp://dev.mysql.com/tech-resources/articles/intro-to-normalization.html and http://datamodel.org/NormalizationRules.html and http://mysqldump.azundris.com/archives/20-Nermalisation.html and some here http://www.keithjbrown.co.uk/vworks/mysql/
asdxso, is_customer is a boolean field
chadmaynardit could be
it might as well be
they either are or aren't customers right?
asdxand i will have customers and users on the same table?
chadmaynardXgc doesn't see why not
actionchadmaynard likes speaking for Xgc
chadmaynardlikes speaking for Xgc
actionXgc likes not having to type.
Xgclikes not having to type.
asdxi will try that, thanks
:)
chadmaynardXgc says no problem
arjenAUbooleans generally won't use an index
so normalisation is a good thing from that aspect also
asdxi've got a error with the bool() type
i used bool now and i got a tinyint type
tinyint(1)
Xgcasdx: I'd like to know the difference between a customer and a user. If there is some significant difference, it seems to me you could have a users table for all users and a separate table containing just customer related information and a FK to the users table.
chadmaynardasdx: thats right
asdxXgc: there isnt really much difference between them
chadmaynard: ok
Xgc: in the future, there will probably be some different fields for each of them
Xgcasdx: Then don't make them different. Add the customer table later.
asdxXgc: but for now is just username/password fields
yeah
thanks a lot :)
rtanhi
i have a case to load data from old table to new table
chadmaynard!m rtan select into
the_wenchrtan see http://dev.mysql.com/doc/refman/5.0/en/select-into-statement.html
mistergibsonis there a quick/easy command to test whether a number is a float or integer?
chadmaynardINSERT INTO foo SELECT ... FROM bar
CPUnerdif (is_float())

Page: 2 9 16 23 30 37 44 51 

IrcArchive

NY Lost Funds