Jump to content


Photo

Order By Timestamp quick question


  • Please log in to reply
2 replies to this topic

#1 Demonic

Demonic
  • Members
  • PipPipPip
  • Advanced Member
  • 562 posts

Posted 28 August 2006 - 08:49 PM

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

$bam = mysql_query("SELECT * FROM mytable WHERE fid='$blah' ORDER BY timestamp") or die(mysql_error());

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.

#2 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 28 August 2006 - 08:51 PM

$query = "UPDATE mytable SET timestamp = '" . time() . "' WHERE fid = '$blah'";


#3 Demonic

Demonic
  • Members
  • PipPipPip
  • Advanced Member
  • 562 posts

Posted 28 August 2006 - 08:54 PM

thanks im gonna do INSERT INTO though thanks :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users