« first day (1882 days earlier)      last day (776 days later) » 

1:04 AM
@Ryan Well, it could be a lot of things (giant caveat)
but a lot of time when confusing things are happening related to character sets or collations, it's because the session's character set/collation doesn't line up with what's stored in the tables
and so the queries come back with different stuff than you expect, and maybe even different stuff from what you see when you run the queries in another client
You could try running SET NAMES 'utf8' (or whatever character set you want to be using) when you start your connection dev.mysql.com/doc/refman/5.6/en/charset-connection.html
 
 
21 hours later…
user5304349
10:02 PM
how do i store addresses of company,customers,employees altogether in a database ?

TABLE --> ADDRESSES

ID PK
CUSTOMERID FK
EMPLOYEEID FK
SERVICECENTERID FK
ADDRESSLINE1
AREA
CITY
POSTALCODE
will it work ?
and FK's can be empty like suppose for servicecenter address customerid and employeeid FK field will remain null ?
 
user5304349
does it violate any NF rule ? i am stuck here
 
@MuhammadUmarTariq Do you want a company, customer, and employee to be able to share the same address?
 
user5304349
no
 
user5304349
addresses will be different
 
Do you want customers, employees, and companies to be able to have multiple addresses each?
 
user5304349
10:04 PM
no one address for each is enough
 
user5304349
but they will be different
 
then have an address table without any foreign keys, and add an address_id column to your customer, employee, and company tables.
 
user5304349
ok thanks got it
 
@MuhammadUmarTariq You're welcome. Live long and prosper
 

« first day (1882 days earlier)      last day (776 days later) »