Mysql hatası

2 views
Skip to first unread message

M.Yontar

unread,
Aug 17, 2007, 12:16:16 PM8/17/07
to <?PHP echo Merhaba Türkiye; ?>
arkadaşlar aşağıda bir queryim mevcut ve salak alet ters çalışıyor.
tpr 1 den
başlayıp 39'a kadar gitmesi gerekirken 39 dan başlayıp 1'e gidiyor
bunaldım ve
sıkıldım kesin ufak bişi var ama....


select
t.text_id, t.tarih , t.konu_res , count(r.text_id) as tpr,
t.konu_icerik_bilg3
from szl_text as t ,
(select text_id from szl_text where durum = 1 and konu_id = 48352
order by
text_id) as r
where
r.text_id < t.text_id and t.konu_id = 48352 and t.durum = 1 group by
r.text_id order by t.tarih

+---------+---------------------+----------+-----+-------------------+
| text_id | tarih | konu_res | tpr | konu_icerik_bilg3 |
+---------+---------------------+----------+-----+-------------------+
| 58431 | 2007-07-07 00:44:00 | NULL | 39 | NULL |
| 58432 | 2007-07-07 00:52:00 | NULL | 38 | NULL |
| 58433 | 2007-07-07 00:59:00 | NULL | 37 | NULL |
| 58434 | 2007-07-07 04:36:00 | NULL | 36 | NULL |
| 58435 | 2007-07-09 17:30:00 | NULL | 35 | NULL |
| 58436 | 2007-07-09 17:34:00 | NULL | 34 | NULL |
| 58437 | 2007-07-09 17:34:00 | NULL | 33 | NULL |
| 58438 | 2007-07-09 17:38:00 | NULL | 32 | NULL |
| 58439 | 2007-07-09 17:42:00 | NULL | 31 | NULL |
| 58440 | 2007-07-09 18:25:00 | NULL | 30 | NULL |
| 58441 | 2007-07-12 19:25:00 | NULL | 29 | NULL |
| 58442 | 2007-07-12 19:26:00 | NULL | 28 | NULL |
| 58443 | 2007-07-12 19:27:00 | NULL | 27 | NULL |
| 58444 | 2007-07-12 19:28:00 | NULL | 26 | NULL |
| 58445 | 2007-07-12 19:28:00 | NULL | 25 | NULL |
| 58446 | 2007-07-12 19:29:00 | NULL | 24 | NULL |
| 58447 | 2007-07-12 19:35:00 | NULL | 23 | NULL |
| 58449 | 2007-07-12 19:44:00 | NULL | 21 | NULL |
| 58448 | 2007-07-12 19:44:00 | NULL | 22 | NULL |
| 58450 | 2007-07-12 21:25:00 | NULL | 20 | NULL |
| 58451 | 2007-07-13 01:25:00 | NULL | 19 | NULL |
| 58452 | 2007-07-13 12:04:00 | NULL | 18 | NULL |
| 58453 | 2007-07-13 20:07:00 | NULL | 17 | NULL |
| 58454 | 2007-07-13 20:12:00 | NULL | 16 | NULL |
| 58455 | 2007-07-13 20:14:00 | NULL | 15 | NULL |
| 58456 | 2007-07-13 20:51:00 | NULL | 14 | NULL |
| 58457 | 2007-07-13 20:56:00 | NULL | 13 | NULL |
| 58458 | 2007-07-14 16:04:00 | NULL | 12 | NULL |
| 58459 | 2007-07-14 16:11:00 | NULL | 11 | NULL |
| 58460 | 2007-07-14 16:49:00 | NULL | 10 | NULL |
| 58461 | 2007-07-15 00:55:00 | NULL | 9 | NULL |
| 58462 | 2007-07-15 19:22:00 | NULL | 8 | NULL |
| 58463 | 2007-07-18 01:31:00 | NULL | 7 | NULL |
| 58464 | 2007-07-18 12:08:00 | NULL | 6 | NULL |
| 58465 | 2007-07-18 12:29:00 | NULL | 5 | NULL |
| 58466 | 2007-07-18 16:20:00 | NULL | 4 | NULL |
| 58467 | 2007-07-19 00:17:00 | NULL | 3 | NULL |
| 58468 | 2007-07-19 17:33:00 | NULL | 2 | NULL |
| 70337 | 2007-08-17 00:24:35 | | 1 | |
+---------+---------------------+----------+-----+-------------------+

Genocider

unread,
Aug 18, 2007, 7:56:52 AM8/18/07
to <?PHP echo Merhaba Türkiye; ?>
En alttaki yerde tarihe göre sıralatmışın onu order by t.tpr yazman
gerekiyor 1 den 39 a sıralatmak için...
Reply all
Reply to author
Forward
0 new messages