Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Use Dibi syntax for cross-db limit
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed May 5, 2015
1 parent b350869 commit 84b485f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/plugins/log.sql/class.sqlLogDriver.php
Expand Up @@ -254,7 +254,7 @@ public function write2($level, $ip, $user, $source, $prefix, $message)
{
if($prefix == "Log In" && $message="context=API"){
// Limit the number of logs
$test = dibi::query('SELECT [logdate] FROM [ajxp_log] WHERE [user]=%s AND [message]=%s AND [params]=%s ORDER BY [logdate] DESC LIMIT 0,1', $user, $prefix, $message);
$test = dibi::query('SELECT [logdate] FROM [ajxp_log] WHERE [user]=%s AND [message]=%s AND [params]=%s ORDER BY [logdate] DESC %lmt %ofs', $user, $prefix, $message, 1, 0);
$lastInsert = $test->fetchSingle();
$now = new DateTime('NOW');
if(is_a($lastInsert, "DibiDateTime")){
Expand Down

0 comments on commit 84b485f

Please sign in to comment.