join tables
i have tables i need to join
pm1_users
Field Type Collation Attributes Null Default Extra Action
UserID int(11) No None AUTO_INCREMENT
UserEmail varchar(500) utf8_general_ci Yes NULL
UserPassword varchar(500) utf8_general_ci Yes NULL
UserFirstName varchar(50) utf8_general_ci Yes NULL
UserLastName varchar(50) utf8_general_ci Yes NULL
UserCity varchar(90) utf8_general_ci Yes NULL
UserState varchar(20) utf8_general_ci Yes NULL
UserZip varchar(12) utf8_general_ci Yes NULL
UserEmailVerified tinyint(1) Yes 0
UserRegistrationDate timestamp Yes CURRENT_TIMESTAMP
UserVerificationCode varchar(20) utf8_general_ci Yes NULL
UserIP varchar(50) utf8_general_ci Yes NULL
UserPhone varchar(20) utf8_general_ci Yes NULL
UserFax varchar(20) utf8_general_ci Yes NULL
UserCountry varchar(20) utf8_general_ci Yes NULL
UserAddress varchar(100) utf8_general_ci Yes NULL
UserAddress2 varchar(50) utf8_general_ci Yes NULL
UserGroupID int(11) No 1
UserSubscribed tinyint(1)
pm1_admin_Chat
UserID int(11) No None AUTO_INCREMENT
pm1_admin_Chat text latin1_swedish_ci No None
date timestamp No CURRENT_TIMESTAMP
pm1_admin_Chat_history
UserID int(11) No None AUTO_INCREMENT
pm1_admin_Chat text latin1_swedish_ci No None
date timestamp No CURRENT_TIMESTAMP
On the users_update.php of PowerMessenger
I need to join the pm1_users UserID, pm1_admin_Chat UserID, pm1_admin_Chat_history UserID
basically I want to create a small chat room on the update page
in the admin section under update i have a text box for chats which will go into admin chat, and show up on the specific user userid update page
pm1_User_Chat
UserID int(11) No None AUTO_INCREMENT
pm1_User_Chat text latin1_swedish_ci No None
date timestamp
pm1_User_Chat_history
UserID int(11) No None AUTO_INCREMENT
pm1_User_Chat text latin1_swedish_ci No None
date timestamp No CURRENT_TIMESTAMP
and vise versa on the update page for the registered person