CodeIgniter Forums
Right syntax of $this->db->join, for ip_address ? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Right syntax of $this->db->join, for ip_address ? (/showthread.php?tid=56990)



Right syntax of $this->db->join, for ip_address ? - El Forum - 02-05-2013

[eluser]Noobigniter[/eluser]
Hi all,
I try in vain to retrieve information stored in a database, based on IP.

Apparently there is a syntax error, but I do not know what it is.

I get the IP address:
Code:
$remote_addr = $this->input->ip_address();
The problem is, at this line:
Code:
$this->db->join($this->table_online.' o', 'o.ident = '.$remote_addr, 'left');
I did some research, but have not found what I was looking for.
I also tried to use :
Code:
$this->db->escape()
,
Code:
`
and
Code:
{}
, or change
Code:
'
by
Code:
"
but also without success.

I'm sure it's bullshit, but I ask for your help.
In advance, thank you.


I have, moreover, already had this problem before .. -.-'