William Duffy

Glasgow Based C# ASP.NET Web Developer

Tag archive for ‘SQL’

Resetting the WordPress Admin Password

I support a lot of WordPress systems and find a common occurence to be adminstrators forgetting their password. In order to reset the admin password I run the following simple SQL query against the WordPress database using MySql query browser. Replace your_database and your_password as required. UPDATE your_database.wp_users SET user_pass = MD5(’your_password’) WHERE user_login = [...]

Order by day column using SQL

If you’ve ever had to sort a SQL query’s resultset using an “order by” clause on a “day of the week” column then you will know it can be very easy, or very tricky, depending on the format that the day is stored in the database. If you stored the day of the week in [...]