Skip to content

Instantly share code, notes, and snippets.

@dubrod dubrod/SADO API
Created Jan 8, 2013

Embed
What would you like to do?
Setting Up and API in PHP for those of us awesome developers using SADO. http://www.shayanderson.com/projects/sado-php-orm.htm
<?
//bootstrap
require_once 'lib/Sado/sado.bootstrap.php';
//pre-qualify
if(function_exists($_GET['method'])){
$_GET['method']();
}
//methods
function getAllUsers(){
//connect
$db = &SadoFactory::getInstance();
$users = $db->selectBuilder()
->select('*')
->from('users')
->get();
$users = json_encode($users);
echo($users);
}
?>
@dubrod

This comment has been minimized.

Copy link
Owner Author

dubrod commented Jan 8, 2013

This is my first API. I learned the basics from this YouTube Video. Very quick easy script for sharing your Public data. https://www.youtube.com/watch?v=F5pXxS0y4bg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.