Is there an online phpFiddle and sqlFiddle that work together so that I can do something with the test sql data?
Using http://phpfiddle.org/ and http://sqlfiddle.com/ but would be great if they could work together.
I'm sure someone out there has created an all-in-one SQL, PHP and JS fiddle. No?
Okay, so this isn't exactly what you asked for, but it's close.
http://jsfiddle.net/S3DR9/
Here you can see a JS Fiddle that is successfully calling out to SQL Fiddle with AJAX (now possible as a result to my apache config to allow this to go through). All you have to have is a SQL Fiddle hash fragment (everything after the #; for example this SQL Fiddle link http://sqlfiddle.com/#!2/a2581/1 has the has fragment of !2/a2581/1) and you can see how I pass that into the URL to get back the JSON response. The rest of the code in that JS Fiddle link is just parts I've taken from my main codebase, simplified as needed. I would imagine this is enough to see the basics, as far as how to put it together.
Now, it would be a whole 'nother exercise to try to wrap up such a call to SQL Fiddle in a PHP library of some sort that attempted to emulate an actual database driver. I would think that would be the sort of thing you'd want to do in a php sandbox, so you could simulate an actual db call. If someone is interested in building that out, let me know.
At the time of writing this, I think there is no combined (php/db) fiddle tools like that. Would be quite useful to have this online tool alright.
I think the best you can do at the moment is to just have your portable server, Apache, Mysql db or you can use XAMPP portable. Something that you can run in your USB.
There are benefits on having a portable version, instead of online fiddles.
then you can also integrate it into dropbox, if you are after the online sharing of urls
You could connect PHP fiddle to dropbox and then use a file based database like sqlite.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With