Jump to content

help :( before i break my laptop :D


bamfon

Recommended Posts

well animeid has to be saved in table episodea or table episodeb  set it up that wau because latter on the tables will have a few million rows, so i made 2 forms one saves info to episodea the other to episodeb, both of the tables will never have the same animeid.

seems that you didn't understand my answer... lets try with an example:

 

Table A

id_a

 

Table B

id_b

 

Rows Values in Table A

1

2

 

Rows Values in Table B

1

2

 

CARTESIAN PRODUCT between Table A and Table B (result from a SELECT  like yours)

1 - 1

1 - 2

2 - 1

2 - 2

 

applying your conditions

WHERE episodea.animeid = '1' OR episodeb.animeid = '1' 

 

Final result

Rows 1 - 1 and 2 - 1

 

more clear?

 

if you data type is INT(11) ideally you should be using numbers no '1'... and to fix an omission in my previous answer...

 

......

CARTESIAN PRODUCT between Table A and Table B (result from a SELECT  like yours)

1 - 1

1 - 2

2 - 1

2 - 2

 

applying your conditions

WHERE episodea.animeid = '1' OR episodeb.animeid = '1'

 

 

Final result

Rows 1 - 1 and 2 - 1

 

in reality the final result is

Rows 1 - 1, 1 - 2 and 2 - 1

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.