suttercain Posted April 17, 2008 Share Posted April 17, 2008 Hi everyone, I have a column that contains NULL, String, Float and Intiger values. Is there away to use a SELECT statement to only pull out the Numbers and Floats (Decimal) ? Thanks. Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted April 17, 2008 Share Posted April 17, 2008 Not entirely sure why you'd have a need to store all those different types in one column, but regular expressions are you friend: $sql = "SELECT * FROM tbl WHERE field REGEXP '^[0-9.]+$' Quote Link to comment 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.