note 70358 added to function.mssql-guid-string
| From: | goofy at osu1 dot php dot net | Date: | Thu, 12 Oct 2006 20:46:24 +0000 |
| Subject: | note 70358 added to function.mssql-guid-string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-118473@lists.php.net to get a copy of this message | ||
in php5 on w2k server and apache works well:
echo mssql_guid_string($RS['T_ID']); is same string as unique identifier in SQL manager
(T_ID) selectet with a standard sql select clause.
im using it in a form to select just this unique dataset to delete like this:
echo
<form name="Delete" action="'.$_SERVER['PHP_SELF'].'"
method="post">
<input type="hidden" name="mode" value="del"/>
<input type="hidden" name="T_ID"
value="'.mssql_guid_string($RS['T_ID']).'"/>
<input type="submit" value="DEL"/></form>';
there seems to be a matrix like this one running at least this function returns the same value: if
you call it like makeuniqueid($RS['T_ID'])
function makeuniqueid($hs)
{
if (strlen($hs) == 16)
{
$hexstring = bin2hex ($hs);
return $sql_uniqueid=strtoupper(substr( $hexstring, 6,2).substr( $hexstring, 4,2).substr(
$hexstring, 2,2).substr( $hexstring, 0,2).'-'.substr( $hexstring, 10,2).substr(
$hexstring, 8,2)
.'-'.substr( $hexstring, 14,2).substr( $hexstring, 12,2).'-'.substr(
$hexstring, 16,4).'-'.substr( $hexstring, 20,12));
}
else
{
$sql_uniqueid = "not valid";
return $sql_uniqueid;
}
}
----
Server IP: 212.124.37.9
Probable Submitter: 84.139.115.144
----
Manual Page -- http://www.php.net/manual/en/function.mssql-guid-string.php
Edit -- https://master.php.net/note/edit/70358
Del: integrated -- https://master.php.net/note/delete/70358/integrated
Del: useless -- https://master.php.net/note/delete/70358/useless
Del: bad code -- https://master.php.net/note/delete/70358/bad+code
Del: spam -- https://master.php.net/note/delete/70358/spam
Del: non-english -- https://master.php.net/note/delete/70358/non-english
Del: in docs -- https://master.php.net/note/delete/70358/in+docs
Del: other reasons-- https://master.php.net/note/delete/70358
Reject -- https://master.php.net/note/reject/70358
Search -- https://master.php.net/manage/user-notes.php