baris168 Posted June 11, 2014 Share Posted June 11, 2014 plugin içerisinde database'den aktarılan datalarda sırlamayı tarih bazında yıl/ay/gün olarak sıralamak istiyorum ancak yaptığım sıralamada gün/ay/yıl olarak yapılmakta bu konuda bana acil olarak yardım ederseniz sevinirim. teşekkürler... Quote Link to comment Share on other sites More sharing options...
KintaRo Posted June 11, 2014 Share Posted June 11, 2014 O işi plugin ile değil SQL sorgusu ile yapmalısınız. Öncelikle veritabanınız SQLite ise tarih sütunu TEXT biçimden, MySQL ile tarih sütunu DATE biçiminde olmalıdır. İkisinde de tarihler YYYY-AA-GG şeklinde kayıt edilmelidir. daha sonra: SELECT * FROM kayitlar ORDER BY tarih ASC şeklinde eskiden yeniye sıralanmış kayıtları çekebilirsiniz. ASC yerine DESC yazarsanız yeniden-eskiye gelir kayıtlar. Quote Link to comment Share on other sites More sharing options...
baris168 Posted June 11, 2014 Author Share Posted June 11, 2014 Veritabanı SQLite ile oluşturmuştum akşam biraz denemiştim ama tarih sütununu date yapamamıştım, tekrar kontrol edeyim. İlginiz için teşekkür ederim. Quote Link to comment Share on other sites More sharing options...
baris168 Posted June 11, 2014 Author Share Posted June 11, 2014 Hocam navicat premium üzerinde database içerisinde table da bulunan dtarihi sütununun tamamını seçtim ve display - set display format'a girerek YYYY-AA-GG yaptım olmadı, ayrıca navicat programının tools - options - display format içerisinde bulunan date içeriğinide denedim sıralama komutu olarak ta "SELECT * FROM baris order by dtarihi ASC" yazdım ancak olmadı nerede hata yapıyorum acaba bu konuda ayrıntılı bilgi verirseniz sevinirim. Quote Link to comment Share on other sites More sharing options...
KintaRo Posted June 11, 2014 Share Posted June 11, 2014 projeyi görmeden bir şey demek zor. Quote Link to comment Share on other sites More sharing options...
baris168 Posted June 11, 2014 Author Share Posted June 11, 2014 hocam size projeyi nasıl gönderebilirim? Quote Link to comment Share on other sites More sharing options...
KintaRo Posted June 11, 2014 Share Posted June 11, 2014 File > Export menüsünden .apz uzantılı dosya oluşturup mediafire.com a yükleyip link verebilirsin. özel bir projeyse özel mesaj ile gönderebilirsin. Quote Link to comment Share on other sites More sharing options...
KintaRo Posted June 12, 2014 Share Posted June 12, 2014 Projenizde bazı düzenlemeler yaptım. Veritabanı dosyanızda tarihleri YYYY-AA-DD şeklinde giremlisiniz demiştim ama halen 16.02.2014 şeklindeydi. Dediğim gibi düzeltince sorun kalmadı. Tarih girme için input yerine DateTimePicker plugini kullandım, ekteki dosya içinde plugin mevcuttur. Global'e küçük bir fonksiyon yazdım, 2014-12-01 şeklinde gelen tarihi 01.12.2014 şekline çevirip ekrana yazdırması için. https://yadi.sk/d/quKDM5dyTAVjZ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.