Jump to content

[SOLVED] help with two tables


syntax101

Recommended Posts

my problem is i want to display all data  that has a "rejected", i have two tables orders and archivedeletedorders and they have all the same fields.

 

 

ex.

 

orders table

name    status  <-fields

henry    pending

squall    rejected

 

 

archivedeleteorders table

name    status  <-fields

philip    pending

john    rejected

 

 

result should be:

 

name    status

squall    rejected

john    rejected

 

my code is:

select * from orders,archivedeletedorders where orders.del_status = "Rejected" and archivedeletedorders.del_status = "Rejected"

 

but the result will combine them like this:

 

name    status      name    status

squall    rejected  john    rejected

 

can anybody help me with this

Link to comment
https://forums.phpfreaks.com/topic/85664-solved-help-with-two-tables/
Share on other sites

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.