karthikeyan_coder Posted November 1, 2006 Share Posted November 1, 2006 Hello, i am getting the values from mysql table... that field type is "TEXT" values are most likely "20061028025416" .. i need to check weater this value is lesser than or equal to 20061108025416 how it is possible? once i cast it as (int) then all of my values are tured in to "2147483647 " Thank you. Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted November 2, 2006 Share Posted November 2, 2006 Use the datatime type in your database table and use the query to make the comparisons - mysql's support for date/time manipulation/calculations is far greater than php's Quote Link to comment Share on other sites More sharing options...
karthikeyan_coder Posted November 2, 2006 Author Share Posted November 2, 2006 ohh ok... so i have to convert my script to $today = date("YmdHis");$sql = "SELECT * FROM `articles` WHERE `date`<='$today'";Thanks ToonMariner :) Quote Link to comment Share on other sites More sharing options...
karthikeyan_coder Posted November 2, 2006 Author Share Posted November 2, 2006 sorry it is $today = date("YnjHis"); 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.