I know, I know, loads of people have been waiting for these…So here we go, I’ve finally sorted a downloaded version of the Dojo examples from the presentation I provided at the MySQL Users Conference 2009. There are three examples:
- The auto-paging table example, which uses the functionality of the Dojo Toolkit and the QueryReadStore to automatically load content from a table.
- The basic graphing example, which loads data dynamically and plots a graph.
- And the zooming version of the same basic graph interface
There’s a README in the download that contains instructions on getting everything up to speed, although it should be fairly obvious. It’s attached to the bottom of this post too.Any questions for getting this to work, please go ahead and ask!Download the package here
UC2009 Working with MySQL and Dojo==================================MC Brown, 2009, http://mcslp.com and http://coalface.mcslp.comComponents:There are three examples here:- Dojo table with auto-paging (table_autopage.html and table_autopage.cgi)- Dojo Basic Graph (graph_basic.html and graph_ajax.cgi)- Dojo Zooming Graph (graph.html and graph_ajaz_zoom.cgi)You will also need the Dojo/Dijit and DojoX toolkit package from here:http://www.dojotoolkit.org/downloadsDownload the combined package, and then extract the contents and place in the same directory as the CGI scriptsIntructions for use:For the Table example, you can create a table (or use an existing DB) from WordPress using the wp_posts tabls.In practice you need only create and populate a table with the following columns:id (int)user_nicename (char)post_date (datetime)post_title (char)To be compatible with the example without any more modifications.For the Graphing examples, you need a table as follows:CREATE TABLE `currencies` ( `currencyid` bigint(20) unsigned NOT NULL auto_increment, `currency` char(20) default NULL, `value` float default NULL, `datetime` int(11) default NULL, `new` int(11) default NULL, PRIMARY KEY (`currencyid`), UNIQUE KEY `currencyid` (`currencyid`), KEY `currencies_currency` (`currency`,`datetime`), KEY `currencies_datetime` (`datetime`)) ENGINE=MyISAM AUTO_INCREMENT=170048 DEFAULT CHARSET=latin1And then populate with date/value data according to the information you want to store.Once done, make sure you change the database information in the CGI scripts to populate the information correctly during operation.