Archive for the 'Programming' Category

Construct MySQL WHERE with array loop Wednesday, April 2nd, 2008

Here’s a quick way to construct the WHERE parameters when snagging data out of a MySQL database using data from an entry form. In this example, I didn’t not include the $_GET, $_POST, or $_REQUEST as I am lazy and the current code I’m working on is using some Smarty thing to get […]

Decode a Multiple-Selection Checkbox From vBulletin Custom Profile Thursday, September 27th, 2007

Yesterday, I needed to decode a Multiple-Selection Checkbox from vBulletin’s custom profile for an external script. I’m not really that experienced at programming, but I through this together and it has worked for me quite well.
I figured most people wouldn’t be all that interested in dealing with “binary stuff”. I know I wasn’t.
// Change ‘field11′ […]

MySQL Left Join Code Saturday, September 8th, 2007

I know just enough php to be dangerous. Okay, well I’ve probably been “dangerous” for a while now. As I get more into this MySQL normalization junk, I can see where I’m going to need more and more MySQL Left Join thingies all the time. So, for my own benefit, here is […]

Javascript Random GetElementById Junk Monday, August 27th, 2007

I have to say that I HATE javascript. While I can usually squirm my way through a php mess, my girlfriend can tell if I had done any work with javascript that day. She walk in and I’ll be pale, holding my knees to my chest, and sucking my thumb. She’ll say […]

Php Line breaks using nl2br Tuesday, July 24th, 2007

I’ve ran into a few situations where a user was to fill out a form but their use of “enter” wasn’t being counted. In other words, all paragraphs were crammed together into one.
Using php’s nl2br function automatically inserts “enter” where the user has placed them.
Brandon

Lunarpages Hosting 2MB Upload Limit Wednesday, June 20th, 2007

I just realized today that I was suffering from the default 2MB PHP upload limit on my home recording site which is hosted at Lunarpages. My recording forum encourages users to upload their mp3 so other users can give their opinion on the quality of the mix. Well, a 2MB mp3 at 128kps […]

Mass Updating A MySQL Database Thursday, June 7th, 2007

One facet of textlinkcenter.com that I’ve been concerned about is the few sections where, using a cron job, I would have to update every record in a database when a given value. I thought I would have to pull out 2 zillion records, store them an array, and then re-insert them. Well, it […]

240 Hour Challenge Thursday, June 7th, 2007

My robo massive project continues. While I’m just cracking into the bottom level of being an “intermediate” php / MySQL programmer, I’m trying to Text Link Center the best it can possibly be. This means the whole process is very time consuming. So be it. I’ve just got to fight the […]

Reducing Server Load With Vbulletin Monday, May 28th, 2007

I stumbled upon a link today that has a list of ways to optimize vBulletin for greater performance / less server load.
If you have used vBulletin, you know that it’s not exactly a “light” load for a server. I must admit that SMF forum did feel quite a bit faster to me. […]

Using Preg Replace For Search Engine Friendly URLs Saturday, May 26th, 2007

I don’t know about you, but I REALLY hate seeing “%20″ in the URL. I haven’t figured out what Google thinks of it yet, but it just looks cheap to me. So when I’m writing SEO friendly URLs, I don’t want to leave any spaces. Let’s assume the title of this particular […]