DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • January 19, 2018, 06:55:20 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

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

Posts: 4647

Be aware of the squirrel!


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

Okay,

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

But, when using relative timestamps it shows this in the commentary section I posted:
Code:
(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?
Logged

Running for more than three years now:
Sichae
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...

Code:
$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.
Logged

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

Pages: [1]   Go Up
  Print  
 
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
15 Guests, 1 User
Aeolus
Home Forums News Downloads Login Register Advanced Search