Source Code for Me (s-c.me)

Allows you to paste souce code to blogs! Adapted for Twitter! Here is Search Form in case you missed your code.
Code:
Selected Language:
Show Linenumbers:
Short link for Twitter:
HTML:

HTML view:

Copy Source | Copy HTML
  1. FUNCTION `GetQueryID`(inQuery VARCHAR(255)) RETURNS int(11)
  2.     READS SQL DATA
  3. BEGIN
  4.   DECLARE existingId INT(11) DEFAULT 0;
  5.   SELECT `queryID` FROM `query` WHERE `query`=inQuery INTO existingId;
  6.     IF (existingId>0) THEN
  7.       RETURN existingId;
  8.     ELSE
  9.         INSERT into `query` SET `query`=inQuery;
  10.         SELECT LAST_INSERT_ID() INTO existingId;
  11.         RETURN existingId;
  12.     END IF;
  13. END;




Based on Manoli.Net's CodeFormatter. Made by Topbot (c) 2008-2012