Need a Sparkline graph with MySQL data

Need a Sparkline graph with MySQL data

Hi there, 

I've been working on a project where I'm using PHP & MySQL to retrieve data from our database to display data (at the moment in html tables), but would like to display the results alongside a sparkline graph. I've had very little experience with javascript and this is my first real test. 

I have included the jquery.js and jquery.sparkline.js libraries, and created a HTML page with the sparkline code, but when I try to pass MySQL query data to the sparkline values I just get PHP errors. I'm thinking this is because the PHP code is being executed server side and the javascript is clientside...but should this stop the sparkline from being generated? I

Can anybody suggest any tutorials/guides/documentation for using sparklines with php & mysql please?... every where I've found so far just suggests to use a separate report building program, or has close to no documentation with how to use the spark lines with php and mysql. 

Thanks in advance for any help.