I have a field in my people table called 'client' and it stores a text string using varchar. But when I get the data from the table and print it using PHP it prints the number 1 for every record, but for all of the other data retrieved for the other fields in the same record it prints out the correct data.
For example, this is the query I am using:
PHP Code:
$peopleIds =& $db->query("SELECT * FROM people P, organisation O, organisationPeople OP WHERE P.personId = OP.personId AND O.organisationId = OP.organisationId AND OP.organisationId = '$_GET[id]' ORDER BY P.first_name ASC"); checkDBError($peopleIds); while($peopleIds->fetchInto($peopleId)) { $peopleId['firstName']; // Prints the first name $peopleId['client']; // Prints 1 for every record }
Any ideas?
Thanks,
|