AS400 SQL Concatenation

I needed to concatenate some information in a table, and I wanted to do it with a SQL query, but I could not for the life of me figure out how to combine the two strings (one a constant, the other a field name) in order to produce a joined value.

Finally, I found it- concat.

 update tablename
 set fieldname = 'constant' concat 'fieldname'

Continue reading “AS400 SQL Concatenation”

Verification Image with PHP

I’m sure you’ve seen those images that display a changing value in them, something that you have to read and then type into a field so that you verify that you’re human (the assumption being that a machine couldn’t read the image to extract the text). They’re everywhere.

Do you need one? That’s a question I can’t answer for you. But I can tell you how to create the image. I am working on another bit to tell you how to actually use the image for verification, but since I can’t quite get it working myself, I’m going to leave that part out. This just shows you how to create the image itself.

Continue reading “Verification Image with PHP”


I had to use more SQL than usual the other day. It had been a while since I had much call to use SQL in my job for something more than a simple query, however. I needed to use it to update some records in a file as I really just didn’t want to write a program to do the work. SQL should have been much faster, had I a clue what I needed to do. Eventually, I struggled my way through it and it was much faster – assuming you didn’t count the time spent on the learning curve to get to where I could actually use it!

Continue reading “AS400 SQL”

Serving Content

I came across a post by someone who found something I wrote to be useful. That’s cool. I’m glad someone is reading.

One thing that this post reminded me of, that I didn’t mention previously, is the MIME type of the document being served. In the case of HTML, the longstanding tradition has been to serve the document as text/html. This is what we’ve always done, and this is what most people continue to do now.

Continue reading “Serving Content”