Skip to content

rokaromeo/dml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Roka\DML

Build Status

MySQL DML in PHP. For fun.

$select = Select::fields('count(*)');
$select->from('users');

$select = Select::fields('name');
$select->from('users');
$select->orderBy('length(name) DESC');
$select->limit(10);
$select->page(12);

$select = Select::fields('name');
$select->from('users');
$select->orderBy('length(name) DESC');
$select->limit(10);
$select->page(12);

$select = Select::fields('foo, bar');
$select = Select::fields(['foo, bar']);
$select = Select::fields('foo', 'bar');
$select = Select::fields(['foo', 'bar']);

$select = Select::fields('name');
$select->from('users AS u');
$select->join('posts AS p ON p.created_by = u.user_id');
$select->leftJoin('comments AS c ON c.post_id = p.post_id');

print $select->getJoin('p');
print $select->getJoin('c');

print $select->getSQL();

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages