no object values set after reading entry from table with db_dataobjects
| From: | FEINKlang e.V. | Date: | Thu, 20 Oct 2005 17:01:07 +0000 |
| Subject: | no object values set after reading entry from table with db_dataobjects | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-21568@lists.php.net to get a copy of this message | ||
hi list,
i have a problem playing around with two days now.
i did all the stuff to use db_dataobjects in my project.
when reading a entry from a table no values are set in the object.
i do it like this:
>DB_DataObject::debugLevel(5);
>$page = DB_DataObject::factory('page');
>$page->debug('xxx', 'xxx',0);
>$page->get(1);
>print_r($page);
on the debug informations for me it looks like all the values are red:
here is the debug information:
dataobjects_page: xxx: xxx
dataobjects_page: CONNECT: NEW CONNECTION
dataobjects_page: CONNECT: mysql://d001dc7d:84rksnfr@localhost/d001dc7d
3f0a3b350e91f6ffe15ba772f1e6f858
dataobjects_page: CONNECT:
a:1:{s:32:"3f0a3b350e91f6ffe15ba772f1e6f858";O:8:"db_mysql":8:{s:10:"autocom
mit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn";a:9:{s:7:"phptype";s:5:"mysql"
;s:8:"dbsyntax";s:5:"mysql";s:8:"username";s:8:"d001dc7d";s:8:"password";s:8
:"84rksnfr";s:8:"protocol";s:3:"tcp";s:8:"hostspec";s:9:"localhost";s:4:"por
t";b:0;s:6:"socket";b:0;s:8:"database";s:8:"d001dc7d";}s:8:"features";a:7:{s
:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numrows";b:1;s:8:"pco
nnect";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:12:"transactions";b:1;}s:9:"fet
chmode";i:1;s:22:"fetchmode_object_class";s:8:"stdClass";s:7:"options";a:8:{
s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";b:0;s:5:"debug
";i:0;s:14:"seqname_format";s:6:"%s_seq";s:8:"autofree";b:0;s:11:"portabilit
y";i:0;s:8:"optimize";s:11:"performance";}s:13:"was_connected";b:1;}}
dataobjects_page: databaseStructure: Loaded ini file:
/www/htdocs/v164260/dataobjects/schema/d001dc7d.ini
dataobjects_page: databaseStructure: Missing links.ini file:
/www/htdocs/v164260/dataobjects/schema/d001dc7d.links.ini
dataobjects_page: GET: id 1 Array ( [0] => id )
dataobjects_page: __find: 1
dataobjects_page: QUERY: SELECT * FROM page WHERE page.id = 1
dataobjects_page: query: QUERY DONE IN 0.00041913986206055 seconds
dataobjects_page: RESULT:
O:9:"db_result":11:{s:8:"autofree";b:0;s:3:"dbh";O:8:"db_mysql":8:{s:10:"aut
ocommit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn";a:9:{s:7:"phptype";s:5:"my
sql";s:8:"dbsyntax";s:5:"mysql";s:8:"username";s:8:"d001dc7d";s:8:"password"
;s:8:"84rksnfr";s:8:"protocol";s:3:"tcp";s:8:"hostspec";s:9:"localhost";s:4:
"port";b:0;s:6:"socket";b:0;s:8:"database";s:8:"d001dc7d";}s:8:"features";a:
7:{s:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numrows";b:1;s:8:
"pconnect";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:12:"transactions";b:1;}s:9:
"fetchmode";i:1;s:22:"fetchmode_object_class";s:8:"stdClass";s:7:"options";a
:8:{s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";b:0;s:5:"d
ebug";i:0;s:14:"seqname_format";s:6:"%s_seq";s:8:"autofree";b:0;s:11:"portab
ility";i:0;s:8:"optimize";s:11:"performance";}s:13:"was_connected";b:1;}s:9:
"fetchmode";i:1;s:22:"fetchmode_object_class";s:8:"stdClass";s:11:"limit_cou
nt";N;s:10:"limit_from";N;s:10:"parameters";a:0:{}s:5:"query";s:42:"SELECT
*
FROM page WHERE page.id = 1
";s:6:"result";i:0;s:11:"row_counter";N;s:9:"statement";N;}
dataobjects_page: __find: CHECK autofetchd 1
dataobjects_page: __find: ABOUT TO AUTOFETCH
dataobjects_page: FETCH:
a:6:{s:2:"id";s:1:"1";s:7:"page_id";s:3:"wir";s:5:"title";s:24:"www.feinlang
-ev.de -
Wir";s:7:"caption";s:3:"Wir";s:10:"project_id";s:9:"feinklang";s:10:"fk_menu
_id";s:1:"1";}
dataobjects_page: fetchrow LINE: id = 1
dataobjects_page: fetchrow LINE: page_id = wir
dataobjects_page: fetchrow LINE: title = www.feinlang-ev.de - Wir
dataobjects_page: fetchrow LINE: caption = Wir
dataobjects_page: fetchrow LINE: project_id = feinklang
dataobjects_page: fetchrow LINE: fk_menu_id = 1
dataobjects_page: fetchrow: page DONE
dataobjects_page: __find: DONE
dataobjects_page: CONNECT: USING CACHED CONNECTION
but calling the print_r() function with the object as parameter is showing
me this:
dataobjects_page Object ( [_DB_DataObject_version] => 1.7.15 [__table] =>
page [N] => 0 [_database_dsn] => [_database_dsn_md5] => [_database] =>
[_query] => Array ( [condition] => [group_by] => [order_by] => [having] =>
[limit_start] => [limit_count] => [data_select] => * ) [_DB_resultid] =>
[_link_loaded] => [_join] => [_lastError] => [id] => [page_id] => [title] =>
[caption] => [project_id] => [fk_menu_id] => )
kann anyone guess what i'm doing wrong.
thanks in advance
sebastian