Vivid Lust Posted February 21, 2008 Share Posted February 21, 2008 The "activedate" query is not inserting into the database where there is nothing stored in it. Heres the code: <?php function lastactive(){ $timenow = time(); $datenow = date("y,m,d"); $timediff = $timenow-$row['activetime']; $datediff = $datenow-$row['date']; $link = mysql_connect('localhost', 'jacsta_jakey', '9348109001'); mysql_select_db('jacsta_db1',$link); mysql_query("SELECT activetime, activedate WHERE member = '{$_GET['member']}'"); if ($row['activedate']==""){ mysql_query("UPDATE members SET activedate=$datenow WHERE member = '{$_GET['member']}'");} if ($row['activetime']==""){ mysql_query("UPDATE members SET activetime=$timenow WHERE member = '{$_GET['member']}'");} } ?> Please help!!!! Thanks Quote Link to comment https://forums.phpfreaks.com/topic/92249-help-please/ Share on other sites More sharing options...
dave420 Posted February 21, 2008 Share Posted February 21, 2008 I would suggest using the MySQL function FROM_UNIXTIME and pass it the time(), as it looks like you're not inserting the date correctly. If you want it in the format you're showing, I'd suggest putting it in quotes in the query. Quote Link to comment https://forums.phpfreaks.com/topic/92249-help-please/#findComment-472624 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.