Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] Acessing fields with periods on the name
#1

[eluser]Unknown[/eluser]
Hi all.

I'm doing a SQL query that's sort of this one:
Code:
SELECT A.ID, B.ID, B.NAME FROM A, B WHERE A.ID=B.ID

I run it with the command "$this->db->query($sql);" with the above SQL and then pass the results to a view.

But when I try to get the columns like:
Code:
$row = $query->row();
echo $row->A.ID;

It gives me the error "A PHP Error was encountered Severity: Notice Message: Trying to get property of non-object" on the "echo $row->A.ID;" line.

How can I get the value of these fields with a period on the name?

Thanks very much for any help.

Cheers.


Messages In This Thread
[SOLVED] Acessing fields with periods on the name - by El Forum - 12-29-2010, 02:04 PM
[SOLVED] Acessing fields with periods on the name - by El Forum - 12-29-2010, 02:12 PM
[SOLVED] Acessing fields with periods on the name - by El Forum - 12-29-2010, 04:35 PM
[SOLVED] Acessing fields with periods on the name - by El Forum - 01-01-2011, 09:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB