Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

A Linux machine! because a 486 is a terrible thing to waste! (By jjs@wintermute.ucr.edu, Joe Sloan)


devel / comp.lang.php / Re: Small and modern database system made in php programming language.

SubjectAuthor
* Small and modern database system made in php programming language.Ingel
`- Re: Small and modern database system made in php programming language.My Name Is Jesus Chris

1
Small and modern database system made in php programming language.

<487b9b7f-a042-48fb-8d67-10402f085673n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=526&group=comp.lang.php#526

  copy link   Newsgroups: comp.lang.php
X-Received: by 2002:a05:622a:18f:b0:302:746e:8894 with SMTP id s15-20020a05622a018f00b00302746e8894mr2463871qtw.285.1653830230294;
Sun, 29 May 2022 06:17:10 -0700 (PDT)
X-Received: by 2002:a05:690c:90:b0:2f1:9b7a:ceec with SMTP id
be16-20020a05690c009000b002f19b7aceecmr55410694ywb.308.1653830230132; Sun, 29
May 2022 06:17:10 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.php
Date: Sun, 29 May 2022 06:17:09 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=82.131.37.176; posting-account=HfIszAoAAAC8ch6q3uChpTWUALHCfEoF
NNTP-Posting-Host: 82.131.37.176
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <487b9b7f-a042-48fb-8d67-10402f085673n@googlegroups.com>
Subject: Small and modern database system made in php programming language.
From: he12091983@gmail.com (Ingel)
Injection-Date: Sun, 29 May 2022 13:17:10 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Ingel - Sun, 29 May 2022 13:17 UTC

<?php

class Dobj {
function getNameOfClass()
{ return static::class;
} }

class Data {

var $dtables;

function gettime() {
return date("d.m.Y H:i:s");
}

function loadobjecttables() {
$dtables = array();
foreach (glob("*.dat") as $file) {
$path_parts = pathinfo($file);
if(!class_exists($path_parts['filename'])) {
continue;
} $file1 = file_get_contents($file, true);
$dtables[] = unserialize($file1);
} $this->dtables=$dtables;
}

function deleteotable($otabname) {
if (file_exists($otabname.".dat")) {
unlink($otabname.".dat");
} $this->loadobjecttables();
}

function insertobject($obj) {
$this->loadobjecttables();
$oclass=$obj->getNameOfClass();
$tabls=$this->dtables;
$oarridx=-1;
for($i=0; $i<count($tabls); $i++) {
if($tabls[$i][0]->getNameOfClass()==$oclass) {
$oarridx=$i;
} }
if($oarridx==-1) return false;
$tabls[$oarridx][]=$obj;
unlink($oclass.".dat");
$b=serialize($tabls[$oarridx]);
$fh = fopen($oclass.".dat", "a");
fwrite($fh, $b);
fclose($fh);
chmod($oclass.".dat", 0700);
}

function saveobjecttables() {
$tabls=$this->dtables;
for($i=0; $i<count($tabls); $i++) {
$oc=$tabls[$i][0]->getNameOfClass();
if (file_exists($oc.".dat")) {
unlink($oc.".dat");
} $b=serialize($tabls[$i]);
$fh = fopen($oc.".dat", "a");
fwrite($fh, $b);
fclose($fh);
chmod($oc.".dat", 0700);
} return true;
}

function saveobjecttable($objcl) {
$tabls=$this->dtables;
$obclindex=-1;
for($i=0; $i<count($tabls); $i++) {
if($tabls[$i][0]->getNameOfClass()==$objcl) {
$obclindex=$i;
break;
} }
if (file_exists($objcl.".dat")) {
unlink($objcl.".dat");
} $b=serialize($tabls[$obclindex]);
$fh = fopen($objcl.".dat", "a");
fwrite($fh, $b);
fclose($fh);
chmod($objcl.".dat", 0700);
return true;
}

function makearrayunique($array){
$duplicate_keys = array();
$tmp = array();

foreach ($array as $key => $val){
if (is_object($val))
$val = (array)$val;

if (!in_array($val, $tmp))
$tmp[] = $val;
else $duplicate_keys[] = $key;
}

foreach ($duplicate_keys as $key)
unset($array[$key]);
return $array;
}

function deleteduplicates() {
$ob=$this->dtables;
for($i=0; $i<count($ob); $i++) {
$o12=$this->makearrayunique($ob[$i]);
$ob[$i]=$o12;
} $this->saveobjecttables();
}

function deleteduplicatescl($objcl) {
$ob=$this->dtables;
$obclindex=-1;
for($i=0; $i<count($ob); $i++) {
if($ob[$i][0]->getNameOfClass()==$objcl) {
$obclindex=$i;
break;
} }
$o12=$this->makearrayunique($ob[$obclindex]);
$ob[$obclindex]=$o12;
$this->dtables=$ob;
$this->saveobjecttable($objcl);
}

function objectClassestoarray($objectA,
$objectB) {
$new_object = array();

foreach($objectA as $property => $value) {
$new_object[$property]=$value;
}

foreach($objectB as $property => $value) {
$new_object[$property]=$value;
}

return $new_object;
}

function query($query) {
$this->loadobjecttables();
$ovars=array();
$objects=$this->dtables;
for($i=0; $i<count($objects); $i++) {
$ovars[]=array_keys(get_object_vars($objects[$i][0]));
} $mches=array();
$results=null;
$exitf=false;

for($i=0; $i<count($objects); $i++) {
if($exitf) break;
for($j=0; $j<count($ovars); $j++) {
if($exitf) break;
if(!class_exists($objects[$i][0]->getNameOfClass())) continue;
if(preg_match("/^get \* from ".$objects[$i][0]->getNameOfClass().";$/",$query)) {
$objectsList = [];
foreach ($objects[$i] as $obj) {
$objectsList[] = (array)$obj;
} return $objectsList;
$exitf=true;
} }
}

for($i=0; $i<count($objects); $i++) {
if($exitf) break;
for($j=0; $j<count($ovars); $j++) {
if($exitf) break;
if(!class_exists($objects[$i][0]->getNameOfClass())) continue;
if(preg_match("/^get ".$ovars[$i][$j]." from ".$objects[$i][0]->getNameOfClass().";$/",$query)) {
return array_column($objects[$i], $ovars[$i][$j]);
$exitf=true;
} }
}

$outp=array();
for($i=0; $i<count($objects); $i++) {
if($exitf) break;
for($j=0; $j<count($ovars[$i]); $j++) {
if($exitf) break;
for($k=0; $k<count($objects); $k++) {
if($exitf) break;
for($l=0; $l<count($ovars[$k]); $l++) {
if($exitf) break;
if(!class_exists($objects[$i][0]->getNameOfClass())) continue;
if(!class_exists($objects[$k][0]->getNameOfClass())) continue;

if(preg_match("/^get \* from ".$objects[$i][0]->getNameOfClass()." join ".$objects[$k][0]->getNameOfClass().
" on \(".$objects[$i][0]->getNameOfClass()."\.".$ovars[$i][$j]."\=".$objects[$k][0]->getNameOfClass().
"\.".$ovars[$k][$l]."\);$/",$query)) {
for($ii=0; $ii<count($objects[$i]); $ii++) {
for($ii2=0; $ii2<count($objects[$k]);$ii2++) {
if($objects[$i][$ii]->{$ovars[$i][$j]}==$objects[$k][$ii2]->{$ovars[$k][$l]}) {
$oobj = $this->objectClassestoarray($objects[$i][$ii], $objects[$k][$ii2]);
$outp[]=$oobj;
} }
} $exitf=true;
} }
} }
}

for($k=0; $k<count($objects); $k++) {
if($exitf) break;
for($l=0; $l<count($ovars[$k]); $l++) {
if($exitf) break;
for($l2=0; $l2<count($ovars[$k]); $l2++) {
if($exitf) break;
if(!class_exists($objects[$k][0]->getNameOfClass()))
continue;

if(preg_match("/^get \* from ".$objects[$k][0]->getNameOfClass()." where ".$ovars[$k][$l]."\=(.*) and ".$ovars[$k][$l2]."\=(.*);$/",$query, $matches)) {
for($ii2=0;
$ii2<count($objects[$k]); $ii2++) {

if($objects[$k][$ii2]->{$ovars[$k][$l]}==$matches[1]&&$objects[$k][$ii2]->{$ovars[$k][$l2]}==$matches[2]) {

$oobj = (array)$objects[$k][$ii2];

$outp[]=$oobj;
} }
$exitf=true;
} }
} }

for($k=0; $k<count($objects); $k++) {
if($exitf) break;
for($l=0; $l<count($ovars[$k]); $l++) {
if($exitf) break;
if(!class_exists($objects[$k][0]->getNameOfClass())) continue;
if(preg_match("/^get \* from ".$objects[$k][0]->getNameOfClass()." where ".$ovars[$k][$l]."\=(.*);$/",$query, $matches)) {
for($ii2=0; $ii2<count($objects[$k]); $ii2++) {
if($objects[$k][$ii2]->{$ovars[$k][$l]}==$matches[1]) {
$oobj = (array)$objects[$k][$ii2];
$outp[]=$oobj;
} }
$exitf=true;
} }
}

if(count($outp)>0) {
return $outp;
}

return $mches;
}

}

?>

Re: Small and modern database system made in php programming language.

<ecdb86ac-007a-4969-991b-338836aee617n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=545&group=comp.lang.php#545

  copy link   Newsgroups: comp.lang.php
X-Received: by 2002:a5d:65c1:0:b0:210:33b7:4525 with SMTP id e1-20020a5d65c1000000b0021033b74525mr12697918wrw.494.1655536115579;
Sat, 18 Jun 2022 00:08:35 -0700 (PDT)
X-Received: by 2002:a81:4997:0:b0:317:8153:d5bf with SMTP id
w145-20020a814997000000b003178153d5bfmr7545374ywa.119.1655536115100; Sat, 18
Jun 2022 00:08:35 -0700 (PDT)
Path: i2pn2.org!i2pn.org!news.neodome.net!news.uzoreto.com!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!feeder1.cambriumusenet.nl!feed.tweak.nl!209.85.128.87.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.php
Date: Sat, 18 Jun 2022 00:08:34 -0700 (PDT)
In-Reply-To: <487b9b7f-a042-48fb-8d67-10402f085673n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=82.131.36.55; posting-account=GXOiAgkAAABFyexKGDGOZoSnK7g0BqhF
NNTP-Posting-Host: 82.131.36.55
References: <487b9b7f-a042-48fb-8d67-10402f085673n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ecdb86ac-007a-4969-991b-338836aee617n@googlegroups.com>
Subject: Re: Small and modern database system made in php programming language.
From: he1983912@mail.com (My Name Is Jesus Chris)
Injection-Date: Sat, 18 Jun 2022 07:08:35 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: base64
X-Received-Bytes: 1643
 by: My Name Is Jesus Chr - Sat, 18 Jun 2022 07:08 UTC

Internet talking place too
| |
| |
| |
| |
V

https://groups.google.com/g/www/c/10IkpJZ3ryI

🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜🦜

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor