JLB Webdesign

Sidewaysgravity is the continuing work of JLB Webdesign. Formerly doing freelance work in internet design. Now working at Lifeboat Creative, JLB Webdesign has been put on hold as a part of an agreement with Lifeboat.

Dates and Databases time() mktime() functions

I recently was working on a website that was build using expression engine and the freeform module. I was creating a separate page that would query the entries table for free form and produce a csv file of all the entries for a certain time period. To do that I had to specify a date range.

Get you sort on! array_multisort()

Recently I was working on a project that does a lot of calculations on information stored in a database. My results were stored in an array, and the user info in another. I then had to sort one array, while at the same time maintain a relationship with the other. Well as my head began to steam looking for a solution to something fairly simple I came across array_multisort() and it did the trick!

New Game

This looks like a fun puzzle game to play. It puts a new twist into a 2-D game. Check out the video in the post.

Get the last Auto Increment ID with mysql_insert_id

This function comes in handy if you need to know the key or index of the last insert into your mysql database. Other methods just don't cut it.

Creating executable Jar files in Java

When all is said and done, in your program in Java, usually you are left with several class files. Sending this file to a friend can be difficult, and thats when you use the .jar "Java ARchive".

Short Hand PHP, and Echo Statements

Quick ways to use the echo statement in php. Reduce the amount of your code with this quick tip.

Ternary Conditionals, An alternative to If Then

Ternary Conditionals can be a great way to reduce the amount of code and simplify your life. I think of them as an alternative to if then statements in PHP. Although they do not; and I dont suggest that you try, completely replace the if then statement, they can be used in many cases where you would normally use if then.

PHP Text Formating, ucwords() ucfirst()

While working on a website for my work, I needed to do more text formatting than I normally do. I needed the first letter of a user input word to be capitalized. By using the php functions ucwords() and ucfirst() I was able to get this accomplished.

Multiple OnLoad() Statements

It is sometimes necessary to use multiple onload statements within the body tag of you website. You might use them to preload images for hover over effects, or to set values of a form if there are values being passed from a different page, ie. $_GET values in php.

Reuse your Select statements with mysql_data_seek( )

This function has come in very handy with the developement of this site. You can use this function to set the data pointer to a certain row within your result that you recieve from a database function, in my case, mysql_query().

Photoshop Tutorials

Finding good tutorials is not always easy. While searching for more information about screencasts the other day, I bumped into what seems to be a good photoshop tutorial podcast by John Reuter.

Christmas Snowegg

This Christmas I wanted to do something other than give out cookies to people who either dont need anymore cookies in their diet, or don't want cookies in their diet.