20100323

Call me, call me!

public static DataTable InsertUpdateInfoGallery()
{
    return InsertUpdateInfoGallery();
}

20100305

Boo-Hoo-Hoo (SQL unleashed series)

ALTER proc [dbo].[stp_tshrGetTestimonialsAdminList](
      @id varchar(100),
      @title varchar(100)
)
As

If(@ID=0)
      BEGIN
            SELECT tshrResort.Title, tshrTestimonial.*
            FROM  tshrTestimonial INNER JOIN
                  tshrResort ON tshrTestimonial.tshrResortID = tshrResort.ID
            ORDER BY tshrTestimonial.DateModified DESC
      END
ELSE IF(@id=null)
      BEGIN
            SELECT tshrResort.Title, tshrTestimonial.*
            FROM  tshrTestimonial INNER JOIN
                  tshrResort ON tshrTestimonial.tshrResortID = tshrResort.ID
            ORDER BY tshrTestimonial.DateModified DESC
      END
ELSE
      BEGIN
            SELECT tshrResort.Title, tshrTestimonial.*
            FROM  tshrTestimonial INNER JOIN
                  tshrResort ON tshrTestimonial.tshrResortID = tshrResort.ID
            WHERE tshrTestimonial.tshrResortID=@id
            ORDER BY tshrTestimonial.DateModified DESC
      END
GO