This php script will take a mysql database and create a json data object with parent child structure for use with d3