In my infinite wisdom I had been providing all the people trying to download snappad with a 404 page. Brilliant! Links have been updated.
In my infinite wisdom I had been providing all the people trying to download snappad with a 404 page. Brilliant! Links have been updated.
One of the most powerful aspects of Snappad are it’s modules. Adding functionality to your project simply by downloading the proper module provides limitless possibilities.This tutorial is intended to teach you how to add a module to your Snappad project. As the Romans used to say Ex exempium scientia. Or as the not yet dead language of English would say “From Example, Knowledge.”
The module we will be installing for use is the database module, commonly called db.mod. The database module is intended to provide access to a mySQL database for a Snappad project, future improvements may allow connection to SQLite or PostgreSQL… But that is for the future, this tutorial is for the now.
Installing db.mod is an easy, three step process.
$config->db = new config;
$config->db->host='server';
$config->db->username='username';
$config->db->password='password';
$config->db->name='database_name';Using the Database module is also easy. Simply include the line “$snappad->load_module(’db’);” in whichever part of your project needs the database connection. This then creates an instance of the db class called $db. Now simply putting $result = $db->query(’SELECT * FROM table’) will execute that MySQL query.
For more information on using the database module, visit the Snappad Wiki.
So you’re hooked, right? You like the idea of seperating out your database interactions from your code and your code from your output. That’s cool. Now let me show you how to write your very first Snappad project.
14 Aug, 2008
Posted by: Zach In: Tutorials
Life is great. You spent a couple hours building a great query to summarize data exactly how you want it, then you put it into a beautiful HTML view. But wait, your client wants to access this data with XML as well! Now what? Have no fear! File Format Awareness is here!
As the title says, Snappad .4 has been released! Celebrate by downloading the newest version of Snappad!