2
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by diafol
0

!!Combining 2 tables!!

CREATE TABLE details (
atm_sno int NOT NULL AUTO_INCREMENT PRIMARY KEY,
  
  pickmodule varchar(20) NOT NULL,

pickmodulemanuf varchar(20) NOT NULL,

  cardreader varchar(20) NOT NULL,

cardreadermanuf varchar(20) NOT NULL,

  printer varchar(20) NOT NULL,

printermanuf varchar(20) NOT NULL,
   
  bank char(20) NOT NULL,

  location char(20) NOT NULL,

  engname char(20) NOT NULL,

date DATE NOT NULL

) type=MyISAM;
CREATE TABLE defect (
atm_sno int(15) NOT NULL,
  
  pickmodule varchar(50) NOT NULL,

pickmodulemanuf varchar(50) NOT NULL,

  cardreader varchar(50) NOT NULL,

cardreadermanuf varchar(50) NOT NULL,

  printer varchar(50) NOT NULL,

printermanuf varchar(50) NOT NULL

) type=MyISAM;

In the second table there is no entry for date so i should use the date from 1st table

select printermanuf, count(*) from details where date >='$entername1' and date <='$entername2' group by printermanuf;

How to change this query to get results from both the table

0
select printermanuf, count(*) from details where date >='$entername1' and date <='$entername2' group by printermanuf
select pickmodulemanuf, count(*) from defect group by pickmodulemanuf

How to join these to get the single result!!!

0
select printermanuf, count(*) from details where date >='$entername1' and date <='$entername2' group by printermanuf
select pickmodulemanuf, count(*) from defect group by printermanuf

How to join these to get the single result!!!

select printermanuf, count(*) from details where date >='$entername1' and date <='$entername2' group by printermanuf
select pickmodulemanuf, count(*) from defect group by printermanuf

How to join these to get the single result!!

0

How to join these to get the single result!!

You schizophrenic or what? You keep having these one-way conversations. Is this your last post or is there any more info to come?
Please formulate your question in full before you post.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.