> -----Original Message----- > From: Daniel-Constantin Mierla [mailto:[EMAIL PROTECTED] > On 04/21/08 16:21, Geir O. Jensen wrote: > > I'm trying to get a timestamp from the sql server with the > following: > > > > avp_delete("$(avp(s:rds_time))"); > > avp_db_query("SELECT time FROM usr_status WHERE > > cid='$ci';","$(avp(s:rds_time))"); > > > > HOWEVER, even if the time field is "2008-04-21 15:06:33" the avp is > > only filled with "2008". Any idea what's going on ?? > > > what is the type of the column in database and operating > system you are using? > > There might be some issues on specific systems when > converting from datetime to string or integer values that are > used with AVPs. Try to wrap the datetime column with > DATE_FORMAT(...) or UNIX_TIMESTAMP(...) > -- these functions return string or integer values.
Ah, forgetting the ever necessary information :D It's on an Ubuntu (6.x) server, and the field type is timestamp (mysql 5.x). I've since worked around my problem, but would still like to have it fixed :D So if there are no other explanations I'll experiment with the above formatting tips. Thanks Gojensen UNINETT _______________________________________________ Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users