Select a query result into a variable

Today marks the end of my not-so brief sabbatical from my blog; thanks to everyone who stuck along. I can promise some free templates not to mention some nice EE themes within the coming weeks.

Anyway, yesterday I was working on a stored procedure that required me to select a field from the table into a variable. I figured it had something to do with the SET keyword, but it took me a while to figure out the exact syntax:

DECLARE @VariableName INT

SET @VariableName = (SELECT COUNT(*) FROM Customers WHERE State = 'MN')

More on easy weblog titles and a bit about images in EE

  1. A super-easy way to get the weblog's (section's) title in EE.

2. Make EE automatically fill in the image's width and height when you upload it to your server via the control panel.

Continue reading "More on easy weblog titles and a bit about images in EE"

More on Easy Expression Engine Titles

You might have read Veerle's article on implementing Expression Engine titles.

I don't use this method, preferring to have the title (and the navigation) be part the header template in a common template group; i.e., the embed method, where you pass the title from the parent template to the child (embedded) template.

The question is: using the embed method, how do you add post titles and category archive headings to the title?

Continue reading "More on Easy Expression Engine Titles"

Free Template: Natheless

I was doing more changes to Blockwriter when I realized that it's been a while since I created a free template. The result is Natheless.

It's actually something I created all the way back in 2006 (hehe) but never got around to uploading to the site. I polished it up a little bit yesterday -- slight gradients for the header and the menus -- and well, here it is.

So go check Natheless out and drop me a comment if you like it. :-)

Blockwriter 1.0 Beta 2 Released

I probably should have called it something like 1.1 or something, since it includes new features, but since the 1.0 is still technically speaking in beta...

Anyway: you'll see from the release notes that, there aren't a lot of new items, but I did implement a full-screen text editor (toggled unimaginatively with the ESC key). The text is also now spaced at 1.5 lines (as opposed to being single-spaced), which is far easier on my your eyes.

Do let me know what you think! If there are any features that you want to see or if you find any bugs, don't hesitate to leave a comment in this post or contact me!

Blockwriter 1.0 Beta

Yes! The last of the modifications I wanted to make for 1.0 are done. The squashing of known bugs also went well (the undead screen now minimizes along with the text editor. The text editor's scroll position stays put. And the user is prompted to save the file when there are unsaved changes).

So: download Blockwriter and let me know what you think!

“Solving” the SQL Server Restoring Database Error

You know the one I'm talking about:

SqlError: The backup set holds a backup of a database other than the existing 'Pro_SSRS' database. (Microsoft.SqlServer.Smo)

For some reason, if you tell SQL Server to overwrite the existing database (look below), the restore works like a charm. The database that I was restoring to had the same name as the backup file, and I'm not so experienced with SQL Server as to know what other (if any) mistakes I was making.

Step 1: click on Options tab; Step 2: check the 'Overwrite existing database' option.

Drag and drop images from Firefox and IE

Drag and drop images from Firefox

I stumbled upon a neat little trick today.

Want to save an image? Click on the image, hold, drag, and drop it into whatever folder you want. Note that this doesn't seem to work for background images (i.e., images placed on page via CSS).

Want to save a link? Want to save a shortcut to the current page or a link? Click, hold, drag, drop.

IE asks you to confirm the copy (look at the dialog below), but Firefox doesn't.

Dialog box confirming image-placement dragged from IE 7

Nice.

3 of 17 pages « First  <  1 2 3 4 5 >  Last »

On the Side