Hey.. I've always wanted to make a add news script. I have down it with a .txt database before but I wanted to try to do it with MySQL. I would want it to be ordered by date. The table would be like date topic message All I would want to know is how to add the stuff to MySQL. Thanks
$query = "INSERT INTO table(col, col)values('$value', '$value'); $result = mysql_query($query, $mysql_link);
where $mysql_link is the line that connects to the database using mysql_connect.
ok, but now how would I make it so it orders by date.. i want mysql to make the date by itself.. Not the user..
if you use a unix time stamp you just put order by col at the end of the query like:
$query = "SELECT * FROM table ORDER BY col";
where col would be the name of the date column