Welcome Guest, Not a member yet? Register   Sign In
Having problems with the table helper
#1

[eluser]sundancekid[/eluser]
Hi, I'm new to CI and just playing around with it trying to figure it out. Anyhow, I tried an example given in the user guide for generating a table from a database query, but it doesn't work for me.

I am trying this:

Code:
$this->load->library('table');

$query = $this->db->query("SELECT * FROM my_table");

echo $this->table->generate($query);

But I get this error:
Code:
A PHP Error was encountered

Severity: 4096

Message: Object of class stdClass could not be converted to string

Filename: libraries/Table.php

Line Number: 270

I know the db settings are correct I can loop through the query and display the results. The table I'm querying has about 5 fields and 3 rows.

Thanks for any help and I lookforward to learning more about CI and getting to know the community here.


Messages In This Thread
Having problems with the table helper - by El Forum - 12-23-2007, 12:19 PM
Having problems with the table helper - by El Forum - 12-23-2007, 12:35 PM
Having problems with the table helper - by El Forum - 12-23-2007, 01:02 PM
Having problems with the table helper - by El Forum - 12-23-2007, 01:49 PM
Having problems with the table helper - by El Forum - 12-23-2007, 05:53 PM
Having problems with the table helper - by El Forum - 12-23-2007, 05:58 PM
Having problems with the table helper - by El Forum - 12-23-2007, 10:41 PM
Having problems with the table helper - by El Forum - 12-23-2007, 11:08 PM
Having problems with the table helper - by El Forum - 12-23-2007, 11:09 PM
Having problems with the table helper - by El Forum - 12-24-2007, 01:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB