• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
T_OBJECT_OPERATOR error with active record result (PHP 4.4.8)

Hello all!

Well, I'm getting an error:

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /nfs/c01/h04/mnt/45239/domains/webresolv.com.br/html/trendpro/system/application/models/trendpro_model.php on line 13

But in this line I have only:
return $this->db->get( $table )->result();

where $table value is the name of some table in database.

My host is MediaTemple, and PHP version is 4.4.8

Some idea about the solution?

When using PHP4 you will not be able to use method chaining.
Try breaking the chained statements into workable parts.
//return $this->db->get( $table )->result();

$query = $this->db->get( $table );
return $query->result();

hello all,

I am a new here, I want to ask,
My design uses CI with PHP5 when I uploaded it to my existing hosting server error constraints:

Parse error: syntax error, Unexpected T_OBJECT_OPERATOR in / home / bitsolus / public_html / bitsolusi / application / controllers / home.php on line 43

whether this is caused by differences in the php version of it ?
or there is a solution to solve this case ?

please i need your solution ...!

home.php on line 43

function profile_list() {
//Cek role dari user
if($this->is_admin()) {
$config['total_rows']=$this->db->get('menu')->num_rows(); //-----> line 43

$this->load->view('menu/profile_list',$data );
}else {

See the reply from @wiredesignz in the previous post.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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