| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 50 | public function getMessagesByConvIdLimit($convId, $user, $limit){ |
||
| 51 | $sql = <<<SQL |
||
| 52 | SELECT |
||
| 53 | * |
||
| 54 | FROM |
||
| 55 | *PREFIX*chat_och_messages |
||
| 56 | WHERE |
||
| 57 | `convid` = ? |
||
| 58 | AND |
||
| 59 | `timestamp` > ( |
||
| 60 | SELECT |
||
| 61 | `joined` |
||
| 62 | FROM |
||
| 63 | *PREFIX*chat_och_users_in_conversation |
||
| 64 | WHERE |
||
| 65 | `user` = ? |
||
| 66 | AND `conversation_id` = ? |
||
| 67 | ) |
||
| 68 | ORDER BY timestamp DESC |
||
| 69 | LIMIT ?,? |
||
| 70 | SQL; |
||
| 71 | return $this->findEntities($sql, array($convId, $user, $convId, $limit[0], $limit[1])); |
||
| 72 | } |
||
| 73 | |||
| 75 |