Entries with the tag “sql”

Blog entries about SQL in general contain the “sql” tag. These may have a mix of specific sql flavors like MySQL or MSSQL or may be theoretical or cross-compatible information.

Use MySQL Gui tools to securely connect to remote database

This particular example is going to be based on a connection from Windows XP using Putty, MySQL GUI tools and Dreamhost.

Write Security Triggers Against SQL Injection

Aug 20, 2007 security sql

An interesting idea that a colleague told me about was a ‘security trigger’ in any application that has a SQL type storage engine. The trick is to make sure that your admin account is not ID #1 and that your administrative username isn’t one of the most common ones:

ODBC for UDB and PHP - How I increased performance by 400%

Aug 2, 2007 php sql

In our current setup at (“the triangle”), we have to use odbc connections to access our db2-udb database - and I don’t like it. But we have to stick with it - and that’s the way life is. The main reason I don’t like it is the immense overhead and time it takes to execute queries. Well, I did some research and found out some interesting things. The most important of which was a cursor setting that allowed me to gain up to 400% performance. Find out how:

PHP developer's shortcut for optimizing mysql

Jul 21, 2007 php sql

PHP developers, raise your hand if you run an explain on each MySQL statement you write and use in your apps! Anyone? Ok… 1… 2… that’s it? Yah, I tend to forget that too, but luckily PHP allows us to cheat. Thanks PHP!

Spell Checking in Eclipse PDT

Although I’d like to pretend that my side jobs always are pure programming, but alas, not the case. There are times when the users send word docs to me and I have to convert them to html. Now, even these word docs might have spelling mistakes - but that’s just not ‘acceptable’ to them - I should correct those issues too! Whats up with that? But anyway, I now have a good plugin to do spellchecking in eclipse - that won’t break on code (well not sorta…). This supports spell checking as you type, language specific options, and more. At any rate, let’s check out eclipse’s built in spelling feature, and then see why this plugin I found is better:

Real world stories of a prepared statement

Jul 6, 2007 php sql

A couple months ago, I was out in Rochester MN at IBM for a multi-day meeting about communication between the iSeries(system-i, i5, as400, whatever its called now a days) and PHP/Apache. One of the things we talked about was our use of ODBC at (“the triangle”) currently to which they asked a good question - Are we using prepared statements over odbc? Well, right now, we’re not, but I think we should. As always, its up to me to show why we should be doing this. Let’s explore:

Random user generation - optimized

Jun 28, 2007 sql

I came across this blog posting about optimizing order by rand() and decided to make my queries better. Here is my real life example on how to optimize this query: