WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
PHP Web Logs (BLogs)
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Forex Trading Online forex trading platform

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Compare NTEXT fields - a function (tested in SQL Server 2000) that can compare two NTEXT values for equality.
Categories : MS SQL Server, Databases, General SQL Click here to Update Your Picture
Tony Lin
Date : Oct 03rd 2008
Grade : 1 of 5 (graded 1 times)
Viewed : 1058
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Tony Lin
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

CREATE FUNCTION [dbo].[COMPARENTEXT] ( @ntext1 NTEXT, @ntext2 NTEXT )
RETURNS BIT
AS
BEGIN
        -- Declare the return variable here
        DECLARE @IsEqual AS BIT
        SET @IsEqual = 1
        -- Compare lengths to get an easy result
        DECLARE @Length1 AS INT, @Length2 AS INT
        SET @Length1 = DATALENGTH(@ntext1)
        SET @Length2 = DATALENGTH(@ntext2)
        IF (@Length1 <> @Length2)
        BEGIN
                SET @IsEqual = 0
        END
        ELSE
        BEGIN
                -- Lengths don't match, so compare NVARCHAR chunks of data
                DECLARE @ChunkIndex AS INT
                DECLARE @ChunkText AS NVARCHAR(4000)
                DECLARE @ChunksAreEqual AS BIT
                SET @ChunkIndex = 0
                WHILE @ChunkIndex < @Length1 AND @IsEqual = 1
                BEGIN
                        -- Compare corresponding 4000-character chunks of NTEXT
                        IF (CAST(SUBSTRING(@ntext1, @ChunkIndex, 4000) AS NVARCHAR(4000)) <>
                                CAST(SUBSTRING(@ntext2, @ChunkIndex, 4000) AS NVARCHAR(4000)))
                                SET @IsEqual = 0
                        SET @ChunkIndex = @ChunkIndex + 4000
                END
        END
        RETURN @IsEqual
END



TSQL INDENTER
Categories : MS SQL Server, Debugging, Databases, General SQL
Dynamic WHERE CLAUSE depending on number of FORM FIELDS
Categories : ODBC, General SQL, PHP, Complete Programs, Databases
Multiple Search using PHP and Mysql
Categories : PHP, Databases, General SQL, MySQL
You have a set of many resources , and You need to know wich of these resources are available for a given use during a given period but MySql does not allow SUB-Selection :( here is the right way to do that in a single query
Categories : MySQL, General SQL, Databases, Algorithms
phpEasySQL - Easily connect to your MySQL database with just 1 php file and 3 easy steps!
Categories : Databases, PHP, MySQL, General SQL
Guestbook sort by descending date and can view page by page
Categories : PHP, MS SQL Server, Databases
Unable to select text bigger than 4K from MSsql
Categories : PHP, WinNT, Databases, MS SQL Server
Sql Builder
Categories : PHP, HTML and PHP, Databases, General SQL, Form Processing
how to activate connection pooling in IIS 3 and IIS 4, for access via ODBC to SQL Server 6.5
Categories : IIS, ODBC, MS SQL Server, Web Servers, Databases
MSSql limitations regarding length of tables, columns, databases..
Categories : MS SQL Server, Databases
This is a class with functions that are taken from simple SQL statements. I made it to have an easier connection between PHP3 and DBase files.
Categories : General SQL, PHP, PHP Classes, Databases
How to connect to MS SQL 6.x+ database server via ODBC functions of PHP3 compiled with iODBC and Openlink drivers under Linux.
Categories : Databases, MS SQL Server, PHP, ODBC
ADODB Database Wrapper Abstraction Library for PHP: MySQL, MSSQL, Oracle, Interbase,ODBC, Microsoft Access and FoxPro.
Categories : PHP Classes, Databases, PHP, General SQL, ODBC
Mssql database Manager
Categories : PHP, Databases, MS SQL Server, Classes and Objects, PHP Classes
Simple class for accessing databases like MSSql Server, Oracle etc by Raju
Categories : PHP, MS SQL Server, Databases, PHP Classes, Oracle