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 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. Link to comment https://forums.phpfreaks.com/topic/92249-help-please/#findComment-472624 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.