oskare100 Posted February 1, 2007 Share Posted February 1, 2007 Hello, I need to select all rows * from a MySQL database where the dec column ends with 0 (or contains 0 if it is easier). How can I do that? Best Regards Link to comment https://forums.phpfreaks.com/topic/36658-select-all-rows-where-the-dec-row-contains-or-ends-with-0/ Share on other sites More sharing options...
artacus Posted February 1, 2007 Share Posted February 1, 2007 It probably shouldn't work, but it does. You can use like '%0' on and int column. Link to comment https://forums.phpfreaks.com/topic/36658-select-all-rows-where-the-dec-row-contains-or-ends-with-0/#findComment-174761 Share on other sites More sharing options...
effigy Posted February 1, 2007 Share Posted February 1, 2007 Contains: SELECT * FROM table WHERE LOCATE('0', field) Link to comment https://forums.phpfreaks.com/topic/36658-select-all-rows-where-the-dec-row-contains-or-ends-with-0/#findComment-174766 Share on other sites More sharing options...
fenway Posted February 1, 2007 Share Posted February 1, 2007 It probably shouldn't work, but it does. You can use like '%0' on and int column. It definitely shouldn't... I'd prefer it you acually did some math to check it. Link to comment https://forums.phpfreaks.com/topic/36658-select-all-rows-where-the-dec-row-contains-or-ends-with-0/#findComment-174774 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.