cerge
Junior Member
Posts: 2
Registered: 3/1/2007
Member Is Offline
|
| posted on 3/1/2007 at 10:01 PM |
|
|
Saving the date and time in mysql
Hi, friends.The code is great. Anyway, i have problem when i want to save it in a mysql table. I dont know how change the dateformat (A or E) to:
YYYY-mm-dd (ex:2007-03-01). I using the DATETIME type in mysql.
I would like to know oyur idea about that,
thanks in advance!
|
|
|
tigra
Administrator
Posts: 1926
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 3/1/2007 at 11:16 PM |
|
|
You should convert and validate the date from human friendly to database format on the client side. It is not a good idea to make people deal with the
database format and then put it into the database without the validation. This also creates security vulnerability.
|
|
|
cerge
Junior Member
Posts: 2
Registered: 3/1/2007
Member Is Offline
|
| posted on 3/2/2007 at 06:15 PM |
|
|
arrows
Yes, you right. Anyway, my boss nees it now so i worked in the change fixing the functions: cal_gen_date2 () and cal_prs_date2 and now the arrow not
are working .I mean, the other thing work fine but not the arrows. By sample, The arrow NEXT with link http://site.com/admin/js/tigra_calendar/img/next.gif send me to http://site.com/admin/js/tigra_calendar/js/tigra_calendar/calendar.html?datetime=1173927600000&id=0 show up one NOT FOUND
page.
With firefox i see this link:<a href="javascript:set_datetime(1173927600000)"><img src="img/next.gif" alt="next month" border="0"
height="16" width="16"></a>
I see now that repit two times "js/tigra_calendar":
http://site.com/admin/js/tigra_calendar/js/tigra_calendar/calendar.html?datetime=1173927600000&id=0
Injs function i fixed the open windows but still it show me NOT FOUND PAGE:
var obj_calwindow = window.open(
'js/tigra_calendar/calendar.html?datetime=' + this.dt_current.valueOf()+ '&id=' + this.id,
'Calendar', 'width=200,height='+(this.time_comp ? 215 : 190)+
',status=no,resizable=no,top=200,left=200,dependent=yes,alwaysRaised=yes'
);
Thanks in advance if you can help me!
|
|
|
tigra
Administrator
Posts: 1926
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 3/2/2007 at 06:41 PM |
|
|
Modifying cal_gen_date2 () and cal_prs_date2() is all that's needed to change the format. If the script stopped working after that then there is an
error somewhere in the modifications you made.
|
|
|
tigra
Administrator
Posts: 1926
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 3/9/2007 at 10:25 PM |
|
|
Ok, we have added the format to the standard distribution. Please re-download.
|
|
|