Oh, I use the ternary operator on a regular basis - but as an operator, not a substitute for the if statement. Instead of
if($test)
do_something('foo','bar',1);
else
do_something('foo','bar',2);
I'd rather write
do_something('foo', 'bar', $test ? 1 : 2);
because among other things it localises the test with the reason the test is being made.
But there is no significant difference to be made by writing
$this->sql->rows > 0
? $this->sql->tran_commit()
: $this->sql->tran_rollback();
over the if statement.