View Single Post
  #7  
Old 05-06-2011, 09:46 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Yeah, if it is unix timestamp, then int(11) is what it wants. I just thought it was supposed to be a timestamp, since it looks to be using asctime() to make it a string in this snippet from the source:

Code:
time_t rawtime;
struct tm * timeinfo;
time ( &rawtime );
timeinfo = localtime ( &rawtime );
char *telldate=asctime(timeinfo);
....
if (database.RunQuery(query, MakeAnyLenString(&query, "INSERT INTO tellque (Date,Receiver,Sender,Message) values('%s','%s','%s','%s')",telldate,scm->deliverto,scm->from,scm->message), errbuf, &result))
Looks like it just needs to be varchar, so I updated the SQL I posted previously. Tested it and it worked fine.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 05-06-2011 at 09:54 PM..
Reply With Quote