motorcity Posted February 1, 2013 Share Posted February 1, 2013 Database; MySQL 5.0.96-community-log This is a pretty basic question. UPDATE products p SET p.products_status = 0, p.vendors_prod_comments = "not in warehouse" WHERE p.shelf_pack = 0 AND p.products_quantity < 1 AND p.inventory < 1 AND p.spec_code = ? The p.spec_code column is; varchar(1) latin1_swedish_ci NULL=No DEFAULT= None The query works just fine but I'm adding the last line and the data in that column is a multiple choice of letters, It could be A, B, C, or any of about ten different letters. But for the purpose of the query I'm trying to find where the row entry is simply blank. No value given. Is there a wildcard I could use here? Something in the place of my ? mark that would only result if there was no value given. I'm pretty new at this but any ideas would be greatly appreciated. As an afterthought, I could probably change that column to default to something, but the question stands. Is there a way? Quote Link to comment https://forums.phpfreaks.com/topic/273886-a-wildcard-for-nothing-there-at-all/ Share on other sites More sharing options...
Jessica Posted February 1, 2013 Share Posted February 1, 2013 No value would be NULL or '' Quote Link to comment https://forums.phpfreaks.com/topic/273886-a-wildcard-for-nothing-there-at-all/#findComment-1409403 Share on other sites More sharing options...
motorcity Posted February 1, 2013 Author Share Posted February 1, 2013 No value would be NULL or '' No value would be NULL or '' Thanks Jessica, two single quotes works just fine. Helped me weed out another 4500 products we can't actually sell. Quote Link to comment https://forums.phpfreaks.com/topic/273886-a-wildcard-for-nothing-there-at-all/#findComment-1409413 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.