简体   繁体   English

合并表以获取相同的user_id

[英]merge table to get same user_id

i got a employer system ( http://envato.jigowatt.co.uk/demos/phplogin/login.php ) and i would like to add ( voting system, employer daily report, message system ) so i started with the voting system and i did download it from here ( http://absolutephp.wordpress.com/2013/03/23/simple-star-rating-system-using-php-mysql/ ) 我有一个用人单位( http://envato.jigowatt.co.uk/demos/phplogin/login.php ),我想补充一下(投票系统,雇主日报,消息系统),所以我从投票系统开始我确实从这里下载了它( http://absolutephp.wordpress.com/2013/03/23/simple-star-rating-system-using-php-mysql/

i did import the ratings table into the employer databaase and made the ratings config work from the employer database ... now how i can make the ratings ID read the users id so the admin can rate employers ? 我确实将等级表导入到雇主数据库中,并从雇主数据库中进行了等级配置...现在,我如何使等级ID读取用户ID,以便管理员可以对雇主进行评级?

i am very sorry but it's really an important issues 我很抱歉,但这确实是一个重要的问题

i have 2 database ( db1 & db2 ) the db1 is the master database and db2 belong to Private Message system with 2 table as following : 我有2个数据库(db1和db2),db1是主数据库,db2属于带有2个表的Private Message系统,如下所示:

-- -

-- Table structure for table users -表users表结构

CREATE TABLE users ( id bigint(20) NOT NULL, username varchar(255) NOT NULL, password varchar(255) NOT NULL, email varchar(255) NOT NULL, avatar text NOT NULL, signup_date int(10) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 创建表usersid bigint(20)NOT NULL, username varchar(255)NOT NULL, password varchar(255)NOT NULL, email varchar(255)NOT NULL, avatar文本NOT NULL, signup_date int(10)NOT NULL)ENGINE = MyISAM DEFAULT CHARSET = utf8;

-- -

-- Table structure for table pm -表pm表结构

CREATE TABLE pm ( id bigint(20) NOT NULL, id2 int(11) NOT NULL, title varchar(256) NOT NULL, user1 bigint(20) NOT NULL, user2 bigint(20) NOT NULL, message text NOT NULL, timestamp int(10) NOT NULL, user1read varchar(3) NOT NULL, user2read varchar(3) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 创建表pmid bigint(20)NOT NULL, id2 int(11)NOT NULL, title varchar(256)NOT NULL, user1 bigint(20)NOT NULL, user2 bigint(20)NOT NULL, message文本NOT NULL, timestamp int(10)NOT NULL, user1read varchar(3)NOT NULL, user2read varchar(3)NOT NULL)ENGINE = MyISAM DEFAULT CHARSET = utf8;

and the db1 is this database enter link description here db1是此数据库,请在此处输入链接描述

so i made the marge so i put the above 2 tables in the db1 now i want it to use the same login_user table so it can run from the same database ... thanks 所以我做了大动作,所以我把上面的2个表放在db1中,现在我希望它使用相同的login_user表,以便它可以从相同的数据库运行...谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM