nemec Posted October 1, 2005 Report Share Posted October 1, 2005 ko izdeviigaak likt datubaazee (1) datetime NOT NULL default '0000-00-00 00:00:00' (2) in(10) NOT NULL ???? protams ja daudz to maina un vispaar njemaas ar datumiem... Link to comment Share on other sites More sharing options...
bubu Posted October 1, 2005 Report Share Posted October 1, 2005 vai nu (1) vai (3) TIMESTAMP Link to comment Share on other sites More sharing options...
nemec Posted October 1, 2005 Author Report Share Posted October 1, 2005 a kas otrais baigi gruziii??? nu tad 1. vai 3.??? Link to comment Share on other sites More sharing options...
fassko Posted October 2, 2005 Report Share Posted October 2, 2005 Manuprāt, timestamp un formatē datu bāzes galā. Link to comment Share on other sites More sharing options...
nemec Posted October 2, 2005 Author Report Share Posted October 2, 2005 kad es visur saliku datetime, tad sagaidu atbildi... Link to comment Share on other sites More sharing options...
Grey_Wolf Posted October 3, 2005 Report Share Posted October 3, 2005 ko izdeviigaak likt datubaazee (1) datetime NOT NULL default '0000-00-00 00:00:00' (2) in(10) NOT NULL ???? protams ja daudz to maina un vispaar njemaas ar datumiem... 23618[/snapback] vienoziimiigi Datatime - sql ir Ljoti daudz iebuuveeto funkciju datuma apstraadei ja vajag dabuut peedeejo apdeitoto laiku tad timestamp vai pie apdeitoshanas tai laukaa kur ir datums rakstam now() - ierakstiis tekosho laiku Link to comment Share on other sites More sharing options...
Delfins Posted October 3, 2005 Report Share Posted October 3, 2005 Datums ar int(10) arī apstāsies pie int(10)... a strings jau paliek strings... kaut vai miljardgadus skaiti... Link to comment Share on other sites More sharing options...
Robis Posted October 3, 2005 Report Share Posted October 3, 2005 starp citu, attiecībā uz php timestamp glabāšanu, vajag nevis int(10), bet int(11). Link to comment Share on other sites More sharing options...
Analgiins Posted October 3, 2005 Report Share Posted October 3, 2005 starp citu, attiecībā uz php timestamp glabāšanu, vajag nevis int(10), bet int(11). 23740[/snapback] Kaapeec? int(11): no -2147483648 liidz 2147483647 int(10) unsigned (jo nav ziimes priekshaa): no 0 liidz 4294967295 http://dev.mysql.com/doc/mysql/en/numeric-types.html Link to comment Share on other sites More sharing options...
Robis Posted October 3, 2005 Report Share Posted October 3, 2005 ok, būtībā tas nav tik svarīgi... Link to comment Share on other sites More sharing options...
Analgiins Posted October 3, 2005 Report Share Posted October 3, 2005 hmm.. te bishkji paeksperimenteeju.. lielaaku timestampu par 2147483647 teiksim funkcijaa date neielikt, lai pareizi izvadiitu datumu echo date("d-m-Y", 2147483647); // 19-01-2038 (2147483647 kas arii ir maksimaalais skaitlis int tipam bez unsigned) echo date("d-m-Y", 2147483648); // 13-12-1901 ;) Link to comment Share on other sites More sharing options...
Robis Posted October 3, 2005 Report Share Posted October 3, 2005 nez, bet daudz kur redzēt, ka liek tabulu laukiem tipus int(11), int(14) utt. Link to comment Share on other sites More sharing options...
bubu Posted October 3, 2005 Report Share Posted October 3, 2005 Tas ir dēļ skaitļu paddinga, kuru vajag dabonot ārā. Link to comment Share on other sites More sharing options...
Delfins Posted October 3, 2005 Report Share Posted October 3, 2005 kāpēc lai nebūt arī INT-signed? tipa dinozuaru DB tiranozavrs: 14 gadsimti pirms mūsu ēras :) ... str_date ir labākais variants, bet ne ātrākais (iespējams) Link to comment Share on other sites More sharing options...
Robis Posted October 3, 2005 Report Share Posted October 3, 2005 Paņēmieni ir daudzi, lai realizētu vis kaut ko par un pa datumu, jautājums - kurš ir ātrākais tikai. Link to comment Share on other sites More sharing options...
Recommended Posts