wayne Posted October 1, 2008 Share Posted October 1, 2008 Hi Wonder if anybody can nelp. I have php file which fires data into db which I want to restrict the firing of so to speak based on sysdate and time. Basically want to include it as an error as an else if with my other errors. Lets say i have two variables called $time and $date which are manually updated each day to todays date and a set time for which i will be wanting to cut off the inserting of data to my db. Firstly how do i identify the sysdate and systime ? and then how do i say that if sysdate is different from $date and systime is greater than $time than errror. Thanks Link to comment https://forums.phpfreaks.com/topic/126577-variables-based-on-systime-and-sysdate/ Share on other sites More sharing options...
getmukesh Posted October 1, 2008 Share Posted October 1, 2008 you can check by using select * from tablename where datefield >= sysdate() if numrows > 0 echo "errors" else echo "other errors" Link to comment https://forums.phpfreaks.com/topic/126577-variables-based-on-systime-and-sysdate/#findComment-654573 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.