Jump to content

Query not working? No Error :: No Results


Perad

Recommended Posts

Hello, can someone explain to me why this query isn't working?

 

What I am trying to do is get the entire coupon table out.

 

Coupons are linked to companies via coupon.company + company.id

 

I am trying to get all coupons where a company begins with letter b.

 

What I think I am doing is this. Selecting all fields from the coupon table, selected data from coupons table, I am then joining the companies and coupons table with the company/id fields. I am then getting all results based on the company name. Obviously something is wrong. Could someone tell me what please.

 

SELECT `be_coupon`.`name`, `be_coupon`.`link`, `be_coupon`.`thumb`, `be_coupon`.`category`, `be_coupon`.`company`, `be_coupon`.`expires` FROM `be_coupon` JOIN `be_coupon_companies` ON `be_coupon_companies`.`id` = `be_coupon`.`company` WHERE `be_coupon_companies`.`name` LIKE '%b' 
Link to comment
https://forums.phpfreaks.com/topic/173512-query-not-working-no-error-no-results/
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.