Category Archives: Database

Looking for help with database queries, or how to optimize a certain type of query, or even possibly protecting yourself and your database.

Unexpected Error Adding new Data Connection in Visual Studio

Unexpected Error Adding new Data Connection in Visual Studio

Recently I was adding a Data Connection in Visual Studio, and I found that I kept getting an error message box whenever I tried.

There were a number of suggestions such as:

devenv.exe /reset

and doing a repair install which didn’t work.

Continue reading

Updating the SiteURL or Home Link for wordpress

Updating the SiteURL or Home Link for wordpress

Here and there I have come up with a problem to solve when either deploying word press sites or beginning to maintain sites that are live. My first step is usually to back up the site locally and attempt to fix the issues or create additional functionality as the situation calls for. The problem is that, the live site is usually not the same url that I am using. For instance, I can not use the same domain unless I want to continually be modifying my dns or hosts files. My solution is to usually have an automated way to create an aliasmatch such as the following: devsite.com/devhost where devhost is the domain. This is usually much different than livesite.com/blog or livesite.com.

Continue reading

MySQL Singleton Class to allow easy and clean access to common mysql commands

The MySQL Database class is implemented using the singleton design pattern. This design pattern allows for only one single instance of the object. This one instance can then be obtained through a static method. This provides a convenience in that you can get your database object from anywhere in your code.
Continue reading

Database PHP Session Handling

Database PHP Session Handling

As you should be aware the HTTP protocol, as used for serving web pages, is completely stateless. This means that after the server has received a request, processed it and sent a response, the process which dealt with that request dies. Anything that the process had in its memory therefore dies with it, so when a subsequent request is received from the same client it is unable to refer to its memory about anything that happened previously.
Continue reading