Welcome Guest, Not a member yet? Register   Sign In
ok , I know I am being dumb..... but I can't get this query to work.....
#1

[eluser]codeamanny[/eluser]
I have been reading through the user manual and it keeps saying that I need to use foreach, however I only want a single result from a table.

Heres the prob...

I used active record to pull some records from my db. Now when I do a var_dump of the $query->result(), I can see the following:

Code:
array(6) { [0]=>  object(stdClass)#13 (3) { ["report_id"]=>  string(3) "125" ["created_date"]=>  string(19) "2007-10-01 00:00:00" ["receipent_company"]=>  string(15) "Yum Yum  ltd" } [1]=>  object(stdClass)#14 (3) { ["report_id"]=>  string(3) "205" ["created_date"]=>  string(19) "2007-02-27 00:00:00" ["receipent_company"]=>  string(15) "Yum Yum  ltd" } [2]=>  object(stdClass)#15 (3) { ["report_id"]=>  string(3) "213" ["created_date"]=>  string(19) "2007-03-01 00:00:00" ["receipent_company"]=>  string(15) "Yum Yum  ltd" } [3]=>  object(stdClass)#16 (3) { ["report_id"]=>  string(3) "233" ["created_date"]=>  string(19) "2007-09-27 00:00:00" ["receipent_company"]=>  string(15) "Yum Yum  ltd" } [4]=>  object(stdClass)#17 (3) { ["report_id"]=>  string(3) "310" ["created_date"]=>  string(19) "2007-05-05 00:00:00" ["receipent_company"]=>  string(15) "Yum Yum  ltd" } [5]=>  object(stdClass)#18 (3) { ["report_id"]=>  string(3) "442" ["created_date"]=>  string(19) "2007-09-17 00:00:00" ["receipent_company"]=>  string(15) "Yum Yum  ltd" } }

I want to put the company name at the top of the report form, however it seems to be impossible to refer to it.


Messages In This Thread
ok , I know I am being dumb..... but I can't get this query to work..... - by El Forum - 04-21-2008, 08:59 PM



Theme © iAndrew 2016 - Forum software by © MyBB