Skip to content

Commit

Permalink
Fixed issue #06138 : crash MSSQL in token information
Browse files Browse the repository at this point in the history
Dev : keep % to have information with token admin edit
  • Loading branch information
Shnoulle committed Jun 23, 2012
1 parent c386009 commit 249c832
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions application/models/Tokens_dynamic.php
Expand Up @@ -81,9 +81,9 @@ public function summary()
if(Yii::app()->db->schema->getTable("{{tokens_$sid}}")){
$data=Yii::app()->db->createCommand()
->select("COUNT(*) as tkcount,
SUM(CASE WHEN (token IS NULL OR token='') THEN 1 ELSE 0 END) as tkinvalid,
SUM(CASE WHEN (sent!='N' and sent<>'') THEN 1 ELSE 0 END) as tksent,
SUM(CASE WHEN (emailstatus = 'OptOut') THEN 1 ELSE 0 END) as tkoptout,
SUM(CASE WHEN (token IS NULL OR token='') THEN 1 ELSE 0 END) as tkinvalid,
SUM(CASE WHEN (sent!='N' AND sent<>'') THEN 1 ELSE 0 END) as tksent,
SUM(CASE WHEN (emailstatus LIKE 'OptOut%') THEN 1 ELSE 0 END) as tkoptout,
SUM(CASE WHEN (completed!='N' and completed<>'') THEN 1 ELSE 0 END) as tkcompleted
")
->from("{{tokens_$sid}}")
Expand Down

0 comments on commit 249c832

Please sign in to comment.