Topic: admin_ranks.php error in query syntax
As I am using SQLite I may be just one of few where this bug becomes apparent. On trying to update a rank I found that an error was generated - yet it worked fine with MySQL. After a little hunting and testing I found this:
// Make sure there isn't already a rank with the same min_posts value
$result = $db->query('SELECT 1 FROM '.$db->prefix.'ranks WHERE id!='.$id.' && min_posts='.$min_posts) or error('Unable to fetch rank info', __FILE__, __LINE__, $db->error());
It appears that SQLite doesn't like the shorthand && and you have to use AND, so the affected part becomes
// Make sure there isn't already a rank with the same min_posts value
$result = $db->query('SELECT * FROM '.$db->prefix.'ranks WHERE id!='.$id.' AND min_posts='.$min_posts) or error('Unable to fetch rank info', __FILE__, __LINE__, $db->error());
providing I didn't mistype my search, a quick check on the other scripts doesn't reveal any more instances of utilising &&