P.S. teksty roznia sie 56 linia.
Gdy na pisze tak to mi zawsze wypisze wartosc z bazy:
<?php
class db_vievRec extends db_query
{
var $where;
var $coll;
var $tabName;
var $structFile;
var $tableFile;
var $row;
var $ret;
function execute($db)
{
$this -> tableFile
= dataBasePath
.$db -> baseName.'/'.$this -> tabName
.table
; $this -> structFile
= dataBasePath
.$db -> baseName.'/'.$this -> tabName
.struct
;
$fp = fopen($this -> structFile
, 'a+');
for($i = '0'; $i < count($coll); $i++) {
if($this -> coll == $coll[$i])
{
$this -> coll = $i;
break;
}
}
for($i = '0'; $i < count($coll); $i++) {
if($this -> where[0] == $coll[$i])
{
$this -> where[0] = $i;
break;
}
}
$row = file($this -> tableFile
);
for($i = '0'; $i < count($row); $i++) {
}
for($i = '0'; $i < count($row); $i++) {
if($this -> where[1] == $row[$i][$this -> where[0]])
{
$this -> row = $i;
break;
}
}
echo $row[$this -> row
][$this -> coll
]; }
function db_vievRec($tabName, $coll, $where)
{
$this -> tabName = $tabName;
$this -> coll = $coll;
$this -> where = $where;
}
}
?>
a gdzy tak:
<?php
class db_vievRec extends db_query
{
var $where;
var $coll;
var $tabName;
var $structFile;
var $tableFile;
var $row;
var $ret;
function execute($db)
{
$this -> tableFile
= dataBasePath
.$db -> baseName.'/'.$this -> tabName
.table
; $this -> structFile
= dataBasePath
.$db -> baseName.'/'.$this -> tabName
.struct
;
$fp = fopen($this -> structFile
, 'a+');
for($i = '0'; $i < count($coll); $i++) {
if($this -> coll == $coll[$i])
{
$this -> coll = $i;
break;
}
}
for($i = '0'; $i < count($coll); $i++) {
if($this -> where[0] == $coll[$i])
{
$this -> where[0] = $i;
break;
}
}
$row = file($this -> tableFile
);
for($i = '0'; $i < count($row); $i++) {
}
for($i = '0'; $i < count($row); $i++) {
if($this -> where[1] == $row[$i][$this -> where[0]])
{
$this -> row = $i;
break;
}
}
return $row[$this -> row][$this -> coll];
}
function db_vievRec($tabName, $coll, $where)
{
$this -> tabName = $tabName;
$this -> coll = $coll;
$this -> where = $where;
}
}
?>
nic nie zwraca(czy chce przypoisac do zmiennej czy wyswietlic echo nic) jaka moze byc pezyczyna