Programming-related articles, from quick tips to tutorials on a variety of topics for webmasters and developers alike. PHP, C#, Python, Java, Flash, MySQL, MSSQL and more are covered.

Search and Replace tool for MSSQL

Every now and then I come across some bad practices that needs repairing. This time the “no-no” was in a database tables. I had to change hard-coded links in quite a few tables. Replacing 10,000 absolute URLs spread across the database can be a huge headache, so I decided to work smart, not hard.
Read more

Converting rootless XmlReader to XmlDocument in .NET

MS SQL has the ability to retrieve data as XML by using the “FOR XML [RAW | AUTO [ELEMENTS] | EXPLICIT]” parameters, which is very useful especially when used in a web service that communicates with a Flash / Flex client as the results don’t have to be converted, but just output to the client.
Read more

A very fast introduction on Mysql triggers

I started to work on a pet project for tracking deleted/pending domains (myDomainTracker) and after starting development I was facing a big problem: How to do the data validation directly from MySQL ?

Many times I wanted to do data validation directly when inserting into a MySQL table and leave the source code of my application nice, clean and very readable, but support for that was only in Oracle and other SQL servers but not in MySQL.

Beginning with version 5 of MySQL the development team has added “triggering” to their SQL server engine, to meet the growing demand of users.

Read more

Get the Current Date for PL/SQL

This is not really a post, just a small note on an item that can make you lose precious time hunting for…

To get the current date in a PL/SQL query in order to compare it with other fields or data from the Oracle database, do this:
Read more

Automatically highlight current page in menu via Javascript

Whenever one builds a website, one issue is always guaranteed time consuming: highlighting the current page or section in the website with a different style.
Read more