• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Query Problem

[quote author="InsiteFX" date="1340815690"]
$this->db->join('uyeler','uyeler.id = arkadaslar.uid + arkadaslar.fid-1', 'left');

After the query add this and it will show you what is going on.
echo $this->db->last_query();


SELECT * FROM (`arkadaslar`) LEFT JOIN `uyeler` ON `uyeler`.`id`=(`arkadaslar`.`uid+arkadaslar`.`fid)-1`

This code working without ` but codeigniter automaticly add this `

Thats why jmadsen above told you to use the db->query, Active Record escapes all its data.

Not all queries are possible with active record. The only thing you can do here is use db::query() as suggested, but taking care to manually escape (db::escape()) any input coming from users (which you don't have in that particular query)

I understood.I will use query function

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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