Welcome Guest, Not a member yet? Register   Sign In
Db error
#1

[eluser]shahnawazahmed[/eluser]
Hello everyone ,
i have developed paginators in the site using pagination library , i modified the sql query by adding $this->db->select , because i wanted to select specific fields from the table

it showing an error

A PHP Error was encountered

Severity: Notice

Message: Object of class CI_DB_mysql_driver could not be converted to int

Filename: database/DB_active_rec.php

Line Number: 877

... Help please ??
#2

[eluser]TWP Marketing[/eluser]
This is the code in your DB_active_record.php
Quote: /**
* Sets the LIMIT value
*
* @param integer the limit value
* @param integer the offset value
* @return object
*/
public function limit($value, $offset = '')
{
877 $this->ar_limit = (int) $value;

if ($offset != '')
{
$this->ar_offset = (int) $offset;
}

return $this;
}
Does your code use a LIMIT clause? The value passed is expected to be numeric and is cast to an integer, as you can see. If you're not passing a numeric value for the LIMIT value, it would give the error you have seen. Check your code for the LIMIT clause and determine what is being used as the limit value.
#3

[eluser]Aken[/eluser]
Paste your code, using the [ code ] tags.




Theme © iAndrew 2016 - Forum software by © MyBB