• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
typos in active_record.html ?

#1
[eluser]Unknown[/eluser]
On user_guide/database/active_record.html it reads

1)

$this->db->select('(SELECT SUM(payments.amount) FROM payments WHERE payments.invoice_id=4') AS amount_paid', FALSE);

should probably read

$this->db->select('(SELECT SUM(payments.amount) FROM payments WHERE payments.invoice_id=4) AS amount_paid', FALSE);


2)
$array = array('title' => $match, 'page1' => $match, 'page2' => $match);

$this->db->like($array);

// WHERE title LIKE '%match%' AND page1 LIKE '%match%' AND page2 LIKE '%match%'

Most probably, it should read

$array = array('title' => $match1, 'page1' => $match2, 'page2' => $match3);

$this->db->like($array);

// WHERE title LIKE '%$match1%' AND page1 LIKE '%$match2%' AND page2 LIKE '%$match3%'


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.