Jump to content
php.lv forumi

Kods atmirst bez error paziņojumiem


EdgarsK

Recommended Posts

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

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 by Trac3 !!
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...