utchnolem na klasie vievRec, editRec, i dropRec.
takie zapytanie do viev rec ygladalo by tak:
<?php
$query = new vievRec
('nazwa tebeli', array('kolumny', 'ktore', 'maja', 'byc', 'pobrane'), ' "gdzie" np. "kolumna" (operatory - "<=", "==", ">=") "wartosc" "id" == "5" albo "id" >= "5" ');
?>
to byl przyklad wykozystania ale nie wiem jak to zrobic siedze i siedze i wymyslile cos takiego: (ale i tak nie bedzie dzialac bo utknolem i nie ykonuje swojej pracy)
<?php
class vievRec extends query
{
var $check = '0';
var $tableName;
var $tableFile;
var $structFile;
var $what;
var $where;
function vievRec($tableName, $what, $where)
{
$this -> tableName = $tableName;
$this -> what = $what;
$this -> where = $where;
}
function execute($db)
{
$where[0
] = preg_replace('#'(.*?)' = '(.*?)'#si', '//1', $this -> where
); $where[1
] = preg_replace('#'(.*?)' = '(.*?)'#si', '//2', $this -> where
); $line = file($structFile); {
for($i = '0'; $i < count($coll); $i++) {
for($j = '0'; $j < count($this -> what
; $j++)) {
if($coll[$i] == $this -> what[$j])
{
$nums .= $i.'|';
}
}
}
}
else
{
for($i = '0'; $i < count($coll); $i++) {
if($coll[$i] == $this -> what)
{
$coll_num = $i;
break;
}
}
}
$line = file($tableFile); for($i = '0'; $i < count($line); $i++) {
}
{
}
else
{
for($i = '0'; $i < count($line); $i++) {
if($line[$i][$coll_num] == $where[1])
{
$
}
}
}
}
}
?>
moze ktos bedzie umial rozwiazac problemy z tymi 3 klasami
Ten post edytował xblant 7.05.2006, 08:22:02