Demonic Posted August 28, 2006 Share Posted August 28, 2006 Ok I've created a table with timestamp in it. Ive completed my forum software almost i need to make it so when i make a topic it updates the time topic was made so i can fix my viewforum and do a[code=php:0]$bam = mysql_query("SELECT * FROM mytable WHERE fid='$blah' ORDER BY timestamp") or die(mysql_error());[/code]so how can i make my topic script update the timestamp with a real date then i can do my code above.Thanks in advanced. Link to comment https://forums.phpfreaks.com/topic/18944-order-by-timestamp-quick-question/ Share on other sites More sharing options...
hitman6003 Posted August 28, 2006 Share Posted August 28, 2006 [code]$query = "UPDATE mytable SET timestamp = '" . time() . "' WHERE fid = '$blah'";[/code] Link to comment https://forums.phpfreaks.com/topic/18944-order-by-timestamp-quick-question/#findComment-81825 Share on other sites More sharing options...
Demonic Posted August 28, 2006 Author Share Posted August 28, 2006 thanks im gonna do INSERT INTO though thanks :) Link to comment https://forums.phpfreaks.com/topic/18944-order-by-timestamp-quick-question/#findComment-81826 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.