note 74834 added to ref.mssql

From: Date: Mon, 30 Apr 2007 10:34:21 +0000
Subject: note 74834 added to ref.mssql
Groups: php.notes 
Request: Send a blank email to php-notes+get-125977@lists.php.net to get a copy of this message
MAXIMUM COLUMN LENGTH OF 30 CHARACTERS.... This restriction was solved by using the following techniques. First create a test which detects this to be the problem and then self correct it. For the times that this is a problem rename the columns to an unique column name which is 30 characters exactly in length. This column must be unique compares to the others, so use the MD5 Hashed value. Since MD5 hashed values are 32 character HEX values, convert this to a toggle Hex value giving an exact maximum length of 31 characters. Prepend a character to the start to ensure that it falls within Column naming regulations. When the data is obtained, check for the hashed values against a check array and replace where neccessary. Although complex it may sound, the method has been tried and successfully works, thus allowing columns of greater length than that of 30 characters. I had this situation within Linux as well as Windows (XAMPP), so this solution was ultimate in solving the problem. You can run the detection as a constant or automatically. However it is best to use a constant for efficiency reasons. Any questions, just email me. ---- Server IP: 194.145.210.3 Probable Submitter: 87.194.152.16 ---- Manual Page -- http://www.php.net/manual/en/ref.mssql.php Edit -- https://master.php.net/note/edit/74834 Del: integrated -- https://master.php.net/note/delete/74834/integrated Del: useless -- https://master.php.net/note/delete/74834/useless Del: bad code -- https://master.php.net/note/delete/74834/bad+code Del: spam -- https://master.php.net/note/delete/74834/spam Del: non-english -- https://master.php.net/note/delete/74834/non-english Del: in docs -- https://master.php.net/note/delete/74834/in+docs Del: other reasons-- https://master.php.net/note/delete/74834 Reject -- https://master.php.net/note/reject/74834 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#125977) next »