$table->load(*ALL ROWS?*); - Joomla! Forum - community, help and support
code: select all
public function getrecords() {
$id = 1;
$table = $this->gettable();
$table->load($id);
$this->records = array($table->title, $table->desc, $table->file, $table->published);
return $this->records;
}
the code above loads 1 row. how can load rows multidimensional array?
so $this->records returned as:
code: select all
results[0] (
1
item 1 desc
item 1 file url
1
)
results[1] (
2
item 2 desc here...
item 1 file url here
1
)
results[2] (
3
item 2 desc here...
item 1 file url here
1
) // etc...
or know of way select records in database within 2.5 component model?
ive tried style of query no avail:
ive tried style of query no avail:
code: select all
public function getrecords() {
$db = jfactory::getdbo();
$query = $db->getquery(true);
$query->select(array('user_id', 'profile_key', 'profile_value', 'ordering'));
$query->from('#__user_profiles');
$db->setquery($query);
$this->records = $db->loadobjectlist();
return $this->records;
}
Comments
Post a Comment