PHP Classes

File: exercise/milkco/ProductTypes.php

Recommend this page to a friend!
  Packages of Jorge Castro   Chaos Machine One   exercise/milkco/ProductTypes.php   Download  
File: exercise/milkco/ProductTypes.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Chaos Machine One
Generate random data that obeys to formulas
Author: By
Last change:
Date: 9 months ago
Size: 487 bytes
 

Contents

Class file image Download
<?php
use eftec\chaosmachineone\ChaosMachineOne;

 include
'common.php';
$chaos->table('ProductTypes', 1000)
        ->
setDb($db)
        ->
field('idProductType', 'int','identity', 0)
        ->
field('name', 'string','database','',0,45)
        ->
field('lastDate', 'datetime','database',new DateTime('now'))
        ->
gen('when always set name.value=random(0,45)')
        ->
gen('when always set lastDate.speed=random(3600,86400)')
        ->
setInsert(true)
        ->
showTable(['idProductType','name','lastDate'],true)
        ->
run(true);