Welcome Guest, Not a member yet? Register   Sign In
querying IP addresses
#1

[eluser]Sub-Zero[/eluser]
Hi!

I'm new to CI and I'm trying to run this query, but it doesn't like the format of the ip addresses. Here is a sample code of the query:

$query = $this->db->query('select atable.field as Afield, btable.field as Bfield from atable, btable where atable.field = 192.x.x.x and btable.field = 192.x.x.x');

Comments are welcome!
#2

[eluser]Developer13[/eluser]
Try this instead:

$query = $this->db->query("select atable.field as Afield, btable.field as Bfield from atable, btable where atable.field = '192.x.x.x' and btable.field = '192.x.x.x'");
#3

[eluser]Sub-Zero[/eluser]
Developer13, thanks!




Theme © iAndrew 2016 - Forum software by © MyBB