Tidbit Tuesday: Paginating in MSSQL
I don’t really work with MSSQL very much and was wondering how to do pagination similar to doing it in MySQL with the LIMIT command. It’s MUCH harder in MSSQL, but here is how you do it:
SELECT * FROM
(SELECT TOP [size_of_record_set] * FROM
(SELECT TOP [end_record] * FROM [table] ORDER BY [field] ASC) AS [...]
The Twitter API
I’ve been messing with the Twitter API for the first time in the last few hours, and I’ve learned a TON. I know – I’m jumping on the bandwagon late, but oh well. I managed to create a script to retweet “stuff” based on the search functionality and I made a script to automatically follow [...]
Tidbit Tuesday on PHP: Simple MySQL Database Insert Function
This builds on a function I did last week: db_query(). You can send any array straight to a MySQL database and it’ll even check to make sure the column actually exists. Oh, and it returns the id of the record you just added in case you needed it.
<?php
function db_array_insert($cfg_array, $table, $array) [...]
Tidbit Tuesday on PHP: Simple MySQL Database Query Function
It’s always great to create functions for those things you do a lot. Probably the single most common function I execute is database calls.
Here is a simple script for hitting up your MySQL database with a query:
<?php
if(!function_exists(dbQuery)) {
function db_query($cfg_array, $query) {
[...]
Tidbit Tuesday on PHP: Holiday Notices for Business Sites
This is a handy script for managing an out of office message on your website. I find this very useful on business websites when you’re tired of making that one little change to let people know when the office will be shut down. With about 15 minutes of extra work, you only need to do [...]
Subscribe
Facebook
Twitter
Digg
Sphinn
LinkedIn