Jump to content
php.lv forumi

DATETIME


ashais13

Recommended Posts

Kr4 ieraksti uzrādās nevis augošā, bet dilstošā secībā.. >

root @ 2010-05-30 00:12:00
ghgjhhg
root @ 2010-05-30 00:12:00
hgjhgjhg
root @ 2010-05-30 00:12:00
ghjhgj
root @ 2010-05-30 00:12:00
aaaaa
root @ 2010-05-30 00:17:00
pamamp
root @ 2010-05-30 00:17:00
lol
root @ 2010-05-30 00:18:00
dfd
root @ 2010-05-30 00:18:00
asdasd
root @ 2010-05-30 00:18:00
dfgdf
root @ 2010-05-30 00:28:00
asdasd 

Kaa dilstooshaa?? Reali tachu ir AUGOSAA seciiba jo

2010-05-30 00:12:00 Ir vecaaks datums nekaa 2010-05-30 00:28:00

Un ts ka nebiji pievienjis Sek. nev liela problema, DateTime shamas aizvietos ar nuliitem ( 00 )

Piedevam :

`date` DATETIME NULL ,

Ir slikts varjants, jo NULL labaak sham datu tipam neizmantot.. (lbak lai ir 00-0000-000 00:00 nevis NULL )

No datu daudzuma viedoklja nekaads zaudejums nebuus, jo izmantojot NULL arii nepieciesami vairaki baiti lai zinatu Kur saks un kur beidzs ieraksts ..

Bet no meklesanas, kartosanas viedoklja zaudejumi atrdarbiiba buus tieshi ar NULL ( katram tuksam ierakstam japarekjina ieraksta Fiziskaa atrasanas vieta )

Un ka jau briedis mineja, izmanto SQL iebuuveto f-ju NOW() , (ja vien nav japadod cits datums )

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...