Connecting to a SQL Database with PHP and ODBC

I recently used a code snippet like this for a project, I didn’t knew about the php extension until then, cause the client wanted the application to connect to a SQL Database, but with PHP. I never thought that it could be easy, but reading it through I was able to get everything working in no time!

This snippet connects to the database and executes a simple query, and displays the data.

HTML5 Experiments

In the last couple of days I’ve been experimenting with the new features of HTML5, the new tags I must say there are some really interesting new stuff in there. “video”, “audio”, “canvas” which is by far the most interesting one I must say because it is said that is going to replace Flash in a future. Has a new drawing API that lets you create and render graphics, animation etc etc. And there’s even a plug in that lets you render 3D graphics which I think is awesome. But in my opinion HTML5 it is not going to replace Flash I prefer to work with both and take the advantages from both API’s, and first HTML5 is still a work in progress, it still has no full support on most mayor browsers out there. Has no support on IE8. The browser that loves it right now is Opera that has full support for HTML5. But hey, Opera is not the browser that most people use out there.

But still HTML5 is awesome and the canvas element is no exception uses JavaScript to create and render graphics and animation. I played with it for a bit and made some simple examples on it, just for learning and get comfortable with it :)
Just put the JavaScript code in the element of your html file.
This example is drawing text, graphics and images on the canvas – http://www.jonathantorres.com/html5exps/canvas.html
here’s the code

This one renders 100 squares and animates them inside the canvas – http://www.jonathantorres.com/html5exps/canvas_full.html
here’s the code

Here’s a good resource that will help you get started: http://dev.opera.com/articles/view/html-5-canvas-the-basics/

It helped me out, hope it does the same for you! Take care!

The PlaneGallery Class

I recently set up this class which creates a gallery of planes using Papervision3D, it reads all of the images, thumbnails and Images from an external XML File, which you must pass as a parameter to the constructor. Then it creates the gallery using this data. Thumbnails are clickable  which in turn load the big image of the thumbnail, and by clicking on it again you close the image and return to the gallery. Is a simple gallery full of planes that rotates to the sides giving it a 3D feeling. I created it for Raymond Delgado’s website you can see it live here: http://www.rdkrex.com/#/Photography

Here’s the code, hope its useful.

SDK’s, releases and new ways

A lot has been going on since I posted, been doing lot of coded work & design stuff. Finished up some contracts and wish to get a new one next week (we’ll see how it plays out…). I’ve been rumbling around my firsts steps on the mobile world, and just started to experiment with the Android SDK in eclipse, and I have been blown away with is ease to use. Event though I’m just starting to learn in Java I know it will be fun cause is soo much alike ActionScript 3.0 or viceversa :P

Here’s a shot of when I got the SDK working :)

Has been awesome but I’m just getting started. I’m planning to use Android to program a game. A game that I’m still working on Flash, It was supposedly be targeted for the IPhone, but due to the damn license restrictions from Apple, the IPhone will have to wait (Need to learn Objective C, and get a MAC to do it). not yet. On the other hand the android SDK is Open Source :) and thats great news, it has a wide range of applications already out there, and their own market too. And for Flash CS5 there will be a public beta soon.

I got my hands on the CS5 trial and the programs have great cool features. It has been a blast. I applied for a free license for the new FlashBuilder (aka Flex) and was accepted, and the new features have been awesome, even tough I have never produced any Flex RIA’s. And I’m still also studying and learning MXML and it’s integration with databases and server side code (PHP, ASP, Cold Fusion). So I will keep learning that awesome stuff in there. Using FlashBuilder of course.

I’ll do some book reviews very soon after got my hands on some awesome ones, Papervision3D, AS3 gamimg, Flex, Android. A lot of stuff that I’m reading. Also working on some cool sites, for some people, Snacks distributors, a beach hotel (we’re in summer!!!), a 3d artist which is a friend of mine you can view the progress here – http://www.rdkrex.com/ it has been a challenge cause I’m using it to get my hands dirty with Papervision3D and SWFAddress for the first time, it has been fun and a challenge. Is cool to grow and learn new things.

Flash Develop an awesome script editor.

Lately I’ve been looking for new ways or say, an easy way to edit my code in AS3 because the Actions Panel in Flash as many of you know, the actions panel works good… but not that great. Each developer has their own ways and styles of working but here I pointed out my basic needs of a new editor.

1. IMPORT statements take me too long. (most of the time had the compiler error of not finding the right class for what I was doing)
2. Syntax highlight. (functions, variables, Types and operators)
3. Curly braces auto-completion {…}
4. One whole screen to edit my code…instead of just a panel.
5. Project Structure.
6. And many other things. (SDK compiler etc ect)

With these needs in mind I found out several weeks ago about Flash Develop

Flash Develop if not the best, an awesome Script Editor that I’ve been using to develop all my flash work, I create graphics, buttons, movie clips in the Flash IDE and write, edit, compile the code and publish my swf in FlashDevelop. It fulfills all of my needs:

1. Import statements are automated (never got to write an import line ever again!)
2. Syntax is auto highlighted (constructor calls, method parameters, properties) and even on custom classes!! Ex. Tweener, PV3D etc etc
3. Curly braces are completed automatically, on method calls, IF ELSE statements, loops etc etc.
4. One software window to edit my code.
5. Project panel, to create or add classes, Interfaces, snippets etc etc.
6. I can use the Open Source Flex SDK!!

And not only that, also creates and edits PHP, HTML, XHTML, XML, MXML, CSS and more. It’s just awesome, check it out give it a download, donate if you have some cash (and a PayPal account!) and support open source projects!

Changing the subject: CS5 is on the way and I can’t wait to get my hands on it, want to explore the new stuff on Flash Builer (aka Flex), Flash Catalyst and the new features on the CS5 software especially the export to IPhone feature on Flash CS5…which by the way is on the way to approval by the cunts of Apple to allow other frameworks to export to IPhone, IPad, Touch etc etc. You can read all about that here. I’m completely agree with Lee.

I’m currently working on some projects for web, email marketing & Flash but also walking through my first steps on Papervision 3D to create some 3d rendered flash content. Trying to take a day to sit down and make a mobile version of my website, and more to come Snap! haven’t found time for that.