koopkoop Posted May 16, 2008 Share Posted May 16, 2008 So I'm trying to run the basic MySQL command: "SELECT * FROM products WHERE itemnumber = "23012NA" on two different tables in the same database. The tables are "database" and "prices" When I run it on "products", I get back one result - as expected. However, I take the exact same query and run it on the "prices" table and it can't find anything. So, I turn the query into "SELECT * FROM products WHERE itemnumber LIKE "%23012NA%" and all of a sudden it can find it. I checked the field for any leading or trailing spaces and there's none. I'm so confused as to why I have to use %LIKE% to find it and EQUAL doesn't work. Link to comment https://forums.phpfreaks.com/topic/105885-where-equals-only-works-on-one-of-two-tables/ Share on other sites More sharing options...
koopkoop Posted May 16, 2008 Author Share Posted May 16, 2008 Solved, please close. Link to comment https://forums.phpfreaks.com/topic/105885-where-equals-only-works-on-one-of-two-tables/#findComment-542649 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.