otuatail Posted June 14, 2008 Share Posted June 14, 2008 I have a database table that stores user login date/time the field is `Setup` varchar(10) default NULL, and takes the php time(); the line of php is this $date = date('d-m-Y H:i:s' , $row['Setup']); ERROR is Warning: date() expects parameter 2 to be long, string given in /home/fhlinux190/d/des-otoole.co.uk/user/htdocs/lowther/admin/users.php on line 44 This has woked for years, but my host has been tweeking it to be less frendly to error trapping. Desmond. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted June 14, 2008 Share Posted June 14, 2008 time() returns a unix timestamp which is an integer. VARCHAR is for storing strings. Correct your data type for the Setup field in your database and it should correct the issue. Set the Setup field data type to INT instead 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.