I pull rows of data from a table using the query module. Works fine and returns everything I want.
Is there a way I can pipe those rows into a php array though? There are four returned values per row.
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
August 14, 2010 9:22pm
Subscribe [1]#1 / Aug 14, 2010 9:22pm
I pull rows of data from a table using the query module. Works fine and returns everything I want.
Is there a way I can pipe those rows into a php array though? There are four returned values per row.
#2 / Aug 15, 2010 11:45am
easier to just use the database class directly to do the query in PHP:
in EE2 it’d look something like this:
<?php
$result = $this->EE->db->query("SELECT ...");
if($result->num_rows() > 0) {
foreach($result->result_array() as $row) {
...
}
}
?>#3 / Aug 15, 2010 2:28pm
Thanks, once again! You are a star.