Hi,
I have this
This gives me an array with objects. Now I want to link these objects to an Operation class so that I can refer to methods eg $object->display() that I would have specified in the Operations class. (well I intend to use the same names so it would be $operations->display(). )PHP Code:function getOperations(){
$query = "SELECT * from tasks";
$result = mysql_query($query);
while ($object = mysql_fetch_object($result))
{
$array[] = $object;
}
return $array;
} /* function */
I can pass on the values of a single object to one specified in the class by using
so using the above example I can get one object. Only. I need to get all the objects.PHP Code:class operations {
var $jobId;
var $taskId;
function setValues(){
... //skipped code that allows me to connect to the database
$query = "SELECT * from task_job ";
$result = mysql_query($query);
$values = mysql_fetch_array($result));
$this->jobId = $values['jobId'];
$this->taskId = $values['taskId'];
}
} /*operations*/
Please help.




Bookmarks