Welcome Guest, Not a member yet? Register   Sign In
Query Problem
#11

[eluser]tolgay[/eluser]
[quote author="InsiteFX" date="1340815690"]
Code:
$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.
Code:
echo $this->db->last_query();
exit;

[/quote]

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

This code working without ` but codeigniter automaticly add this `
#12

[eluser]InsiteFX[/eluser]
Thats why jmadsen above told you to use the db->query, Active Record escapes all its data.
#13

[eluser]CroNiX[/eluser]
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)
#14

[eluser]tolgay[/eluser]
I understood.I will use query function




Theme © iAndrew 2016 - Forum software by © MyBB