PHP Classes

File: dbf_test.php

Recommend this page to a friend!
  Classes of Eduardo Henrique Molina da Cruz  >  Perfect Database File 2  >  dbf_test.php  >  Download  
File: dbf_test.php
Role: Example script
Content type: text/plain
Description: Examples of using the class.
Class: Perfect Database File 2
File based database manager with SQL query support
Author: By
Last change: Examples of the new class version.
Date: 17 years ago
Size: 4,652 bytes


Class file image Download

= "SElEcT * from tabela1 WherE `id` > 't ORDERe\'ste' or `numerico` > 5.98 OR numero2n <= 6.98 OR other = 't \'\'\'r LIMITy' AND (`campo` != 'obadf dd fdfasaeeetaaaa' AnD campo2 <= '5' OR `numero` not LIKE 3.19 AND `oid` not LIkE 'bosjfhdsbf jdshfasdsa \'b') and trf LIKE 'dfsf' ORDeR by hjg,teste limit 9";

$sql = "SELECT * FROM clientes limit 1 order by id desc,dominio limit 0,8";

$sql = "SELECT teste,oid,trs FROM tabela1 ORDER BY list1,list2 DESC, hjg DESC,`teste` ASC,asc desc,campo5, campo6 LIMIT 9";

$sql = "SELECT teste,oid,trs FROM tabela1 WHERE id>'t ORDERe\'ste' AND other='t \'\'\'r LIMITy' AND (campo != 'obaaaaa' OR oid NOT LIKE 'bosasdsa \'b') AND trf LIKE 'dfsf' ORDER BY hjg,teste";

$sql = "SELECT teste,oid,trs FROM tabela1 WHERE id>'t ORDERe\'ste' AND other='t \'\'\'r LIMITy' AND (campo != 'obaaaaa' OR oid NOT LIKE 'bosasdsa \'b') AND trf LIKE 'dfsf' LIMIT 9,15 ORDER BY hjg,teste DESC";

$sql = "INSeRT INTo `clientes` values (0,0,4.3)";

$sql = "DELETE FROM `clientes` where id=1";

$sql = "UPDATE `clientes` set dominio=null where id=2";

// Dump test
$sql = "INSERT INTO `clientes` values
(1,'','Eduardo Cruz','','MTIz') ,
(2,'','Mister GooGle','','MTIz') ,

INSERT INTO `emails` values
('ticketsadd',NULL,'eduardo@localhost.localdomain','uaheuaehu','tid',1,'p','seu nome eh {nome} e seu id eh {id}. Novo ticket, id eh {tid} <br>\r\n{hostname} | {dia} | {hora}') ,
('nao_pagou',NULL,'','voce naum pagou',NULL,1,'p','Prezado {nome} dono do site {dominio}, <br>\r\nVoce tem ateh o dia {dia} às {hora} para pagar') ,
('boletosend','','','aeeeeeeee','var1,var2',1,'p','uhahuhahuauh\r\npara o cliente {dominio} de nome {nome}<br>\r\nsi fudeu!!!!!!!!! {var1} auhahuuhauhauh {var2} \" \' \"\r\n<br>\r\n{hostname} | {dia} | {hora}') ,
('teste','','','Teste','teste,teste2,teste3,teste5',1,'h','aewwwwwwwwwww {teste} {teste2} {id}') ,
('testex',NULL,'','testex','var1,var2,var3',1,'p','aew') ,
('novo_cliente',NULL,'','vc eh novo aki','dominio2,ftp,login,senha',1,'p','Olá {nome}, <br>\r\nVocê se cadastrou aqui no dia {dia} às {hora}. <br>\r\nSeu dominio novo é: {dominio2} <br>\r\nSeu ftp é: {ftp} <br>\r\nseu login {login} <br>\r\nsenha {senha}');

-- Tabela operadores

INSERT INTO `operadores` values
(1,'eduardo','Reginaldo Silva','Geral','202cb962ac59075b964b07152d234b70');

INSERT INTO `sadicionais` values
(5,'10000 GB de transferencia',1) ,
(3,'10gb de espa&ccedil;o em disco',30);

INSERT INTO `tickets_1` values
(9,2,'titulo again',NULL,1,'o','Suporte',1062726300) ,
(18,1,'fydfhghfgh',1,1,'o','Suporte',1062867163) ,
(19,1,'adsasd',1,1,'c','Administra&ccedil;&atilde;o',1062867287) ,
(20,1,'fdhgfhgfh',1,NULL,'o','Financeiro',1062951886) ,

INSERT INTO `tickets_2` values
(39,21,1,'o','testeeeeeeeeeeeee de novoooooooooooooo',1063740430,'') ,
(32,18,1,'c','fala tio',1062867227,'') ,
(35,19,1,'o','asdasd',1062867363,'') ,
(36,9,1,'o','ae {a=}link{/a} &quot;aeee&quot;',1062944921,'') ,
(37,20,1,'c','hfdghgfh',1062951886,'') ,
(38,21,1,'o','testeeeeeeeeeeee',1063740385,'') ,
(30,9,1,'o','aew {neg}negrito{/neg} {ita}italico{/ita}',1062866738,'') ,

$sql2 = "
              CREATE TABLE `cadicionais` (
  `id` int(11) NOT NULL auto_increment key,
  `paystatus` char NULL ,
) ,
`clientes` (
  `id` int(11) NOT NULL auto_increment key,
  `dominio` char (20000) NULL default 'vilmoca',
  money (12) not Null default 9.8

$sql2 = "drop table clientes; drop table cadicionais";
$dbf->query("drop table cadicionais");

$q = $dbf->db_query("db", $sql);
$q = $dbf->db_query("db", "SElect * from clientes");

// fetc_row and fetch_array
// num_rows
while ($row = $dbf->fetch_row($q))

$q2 = $dbf->query("LIST databases");
while (
$row = $dbf->fetch_array($q2))

$q3 = $dbf->db_query("db", "LIST tables");
while (
$row = $dbf->fetch_array($q3))

$q3 = $dbf->query("LIST fields of table clientes");
while (
$row = $dbf->fetch_array($q3))
$dbf->result($q3, 1, "name");

$q3 = $dbf->query("show create table clientes");
$createtb = $dbf->fetch_array($q3);


For more information send a message to info at phpclasses dot org.