Jump to content

Berserk87

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Berserk87's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ohhhhhhhh ty, i understand now. whats the difference between 'column' and 'VARCHAR'? or were u just using column as an example?
  2. [code] $title = $_POST["title"]; $message = $_POST["message"];       $date = date("Y-m-d"); $time = date("h:i:s A"); mysql_query("INSERT INTO messages (username, title, message, date, time) VALUES('$username', '$title', '$message', '$date', '$time' ) ") or die(mysql_error()); [/code] so i replace "$date and $time" with "$datetime = DATETIME"      ? what whaat else? "$result = mysql_query("SELECT * FROM messages ORDER BY DATETIME desc") or die(mysql_error());  " instead?
  3. im not very fluent in php, i know basics, and some intermediate stuff but not much into mysql, so ull have to explain what im replacing that with =\ i get what your saying, im jsut a bit confused. right now the posts are timestamped using this when its posted. [code]$date = date("Y-m-d"); $time = date("h:i:s A");[/code] and yes, that is being stored in a VARCHAR field
  4. [url=http://distortedminds.net/]http://distortedminds.net/[/url] i time stamped all the posts on the main page. and heres a screen of 'php my admin' [attachment deleted by admin]
  5. <looking at the page from the link> the two bottom ones are in the right order. the one of the very bottom was a test, then that same day "Adam" posted again, and it appeared on top of my first one like it should have. then the next day i posted the "ill do more on it tomorrow. i work 10-3 tomorrow, and im goin to bed righ tnow " then this morning (i think) or late last night "Adam" posts but the post appeared under my last one instead of above, then i post after that labeled "error?" which appears under "Adams" post instead of on top again...
  6. first off, hello. im completely new here and am hoping that i can get help asap. i got help from other places before, but one of them seems to have disappeared, and the other it sometimes takes 2 days or more, if i get a response at all. so ill explain the problem, quoting off a post of mine somewhere else. [quote]im still a noob to php but i have gotten into mysql and made my own user/posting system. well, it was working right.... it was organizing the posts by date desc, time desc, so that the newest post would be on top and descending. what happened was the first day it worked fine, and now its off. it looks like its organizing them all by date desc, but the second day is time accending. [url=http://distortedminds.net/]take a look[/url] that is my website, im just testing stuff out and it does still need quite a bit of work on it. i actually modified the default wordpress theme a little, but all the other stuff coded into it i made. u can make a user, u wont be able to do anything yet :P [code]$result = mysql_query("SELECT * FROM messages ORDER BY date desc, time desc") or die(mysql_error());  while($row = mysql_fetch_array( $result )) {   echo "<br> <br> <b>" . $row['username'] . ":</b>"; echo "<font color = 'red'><b><br>" . $row['title'] . "</b></font>"; echo "<br>" .  $row['message'];   $id = $row['id'];   echo " <br><br> | <a href='comments.php?id=$id'>comments</a> | ";[/code] [/quote]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.