Welcome Guest, Not a member yet? Register   Sign In
echo field from db (mysql) when there is a space character in field name
#1

[eluser]tsiger[/eluser]
Hello everyone,
I've got a DB transfered from Access and a field contains a space character in the field name (Why people do that, even in Access?)

so when i try to refer to this field:
Code:
if ($query->num_rows() > 0)
    {
           $row = $query->row();
        echo $row->Home Address;
    }

i am getting an error (seems normal).
How do i refer to this field in order to display it? quotes? any other characters? i played with it for a while but no luck (tried for example echo $row->'Home Address', doesn't work)


Messages In This Thread
echo field from db (mysql) when there is a space character in field name - by El Forum - 07-29-2008, 01:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB