Maris-S Posted May 26, 2010 Report Share Posted May 26, 2010 Katram gadījumam pamēģini abiem vaicājumiem pielikt limit uz kādiem 10 ierakstiem, iespējams Mefisto taisnība, ka ierakstu par daudz, kau kas varbūt nevelk tik lielus apjomus. Dīvaini ka kļūdas nekādas neizdod. Ieliec paste.php.lv Database_ objekta skriptu, tomēr gribās viņu apskatīt. Link to comment Share on other sites More sharing options...
rATRIJS Posted May 26, 2010 Report Share Posted May 26, 2010 Nezinu vai taadus datu masiivus vispaar buutu veelams glabaat masiivaa. Ja jau tas ir tikai jaaizvada aaraa, tad kaadeelj to vispirms tu sabaaz masiivaa? btw ir taada lietaa kaa http://uk.php.net/mysql_fetch_object Link to comment Share on other sites More sharing options...
Grey_Wolf Posted May 26, 2010 Report Share Posted May 26, 2010 Saproti, sie rezultati ir jaatelo viena lapa, tapec arii tik daudz datu tiek pieprasiti lai varetu sadalit pa dienam, jo dienas veido pec taimstampa Atskjiro & sakarto jau SQL pusee un miers... Link to comment Share on other sites More sharing options...
Trac3 !! Posted May 26, 2010 Report Share Posted May 26, 2010 (edited) SELECT created, sum(method1) as method1, sum(method2) as method2 FROM ( ( SELECT FROM_UNIXTIME(created, '%d%m%Y') as created, count(id) as method1, 0 as method2 FROM tabula WHERE method='method1' and project_id='{$project}' GROUP BY created ) UNION ALL ( SELECT FROM_UNIXTIME(created, '%d%m%Y') as created, 0 as method1, count(id) as method2 FROM tabula WHERE method='method2' and project_id='{$project}' GROUP BY created ) ) as tt GROUP BY created; Edited May 26, 2010 by Trac3 !! Link to comment Share on other sites More sharing options...
Recommended Posts