orafrijoles
Posts: 4
|
| Posted: 08/18/2005, 4:28 PM |
|
Today I've trying long time with this, the problem is simple i'm just creating a connection object , executing a query and then trying to fetch the values and store them in arrays. This portion of code is located in 'Before Execute Select' event of a grid.
Here it is
// First declare my multiple array
$table = array("clv" => array(),"equipos" => array(),"jj" => array(),
"jg" => array(),"je" => array(),"jp" => array(),"gf" => array(),"gc" => array(),
"puntos" => array());
// Create the connection
$equipos = new clsDBtrinca();
// SQL Statement
$sql_equipos = "SELECT equ_clv, equ_nombre ";
$sql_equipos .= "FROM grupos_soccer RIGHT JOIN equipos ON ";
$sql_equipos .= "equipos.gru_clv = grupos_soccer.gru_clv LEFT JOIN temp_actual ON ";
$sql_equipos .= "grupos_soccer.tmp_clv = temp_actual.tmp_clv WHERE temp_actual.tact_clv = 1";
// Execute the query
$equipos->query($sql_equipos);
// Grab the values and store in the array
while ($equipos->next_record()) {
array_push($table["clv"],$equipos->f["equ_clv"]);
array_push($table["equipos"],$equipos->f["equ_nombre"]);
echo $equipos->f["equ_nombre"]."<br>";
}
$equipos->close();
I follow the same instructions matched on the user guide, and yet can't go on, i echo the values and nothing is printed on screen. I have more experience on PHP as raw coder and i don't understand why my code is not working. Do i have to use only your object model or something. Anyway i hope you can help me out.
_________________
Sable y machete |