DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • August 22, 2019, 09:28:28 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Resource Pages

Pages: [1]   Go Down
Author Topic: commentary question  (Read 2397 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
Mod God
Offline Offline

Posts: 4647

Be aware of the squirrel!

View Profile WWW
« on: January 27, 2005, 08:35:39 AM »


I manually want to insert a commentary. No problem.
$sql = "INSERT INTO commentary (`section`, `author`, `comment`, `postdate`) VALUES ('".$section."', '". $session[user][acctid] ." ', ':does this and that', NOW());";
the comment gets inserted without any real problems...

But, when using relative timestamps it shows this in the commentary section I posted:
(17h21m) <dKT> Admin XChrisX says, "test"

It was exactly 5:21 PM when I posted that... So, what's wrong?? Do I have to use the PHP-date function insted of the SQL?

Running for more than three years now:
iMod God
SVN Users
Mod God
Offline Offline

Posts: 3458

If ya didn't get it by now... you're hopeless...

View Profile WWW
« Reply #1 on: January 27, 2005, 09:54:19 AM »

Your syntax is out of order... I believe...

$sql ="INSERT INTO ".db_prefix("commentary")." (postdate,section,author,comment) VALUES (now(),'".$texts['section']."','".$session['user']['acctid']."',':does this and that'")";

Try to change that around. If not, something may be fishy.

If you didn't understand anything in the above post, don't try to attempt anything suggested.

Pages: [1]   Go Up
Jump to:  

DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
123 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search