Hi Darren!
On Thu, 13 Nov 2003 12:35:36 +0000 (UTC), "Darren" <zeen@zeen.co.uk>
wrote:
[color=blue]
>Hi wondering if anyone can help.
>
>What i'm trying to do is get a company from a MSSQL database with the
>COMPANYNO which is a 'uniqueidentifier'. Then with this COMPANYNO I want to
>reference it to another table (on same database) to extract more details.
>
>When I get the company name and company no the company no outputs like...
>63180001000000000000000000000000
>In basic terms I'm only getting it like...
>$query = "SELECT COMPANYNO FROM CONTACT";
>
>Now I know this isn't a 16 byte binary - is it?
>
>I wanted to reference another table so I...
>$query = "SELECT ACTIVITYHEADERNO,COMPANYNO FROM ACTIVITYHEADER WHERE
>COMPANYNO='$companyno'";
>[/color]
Apart from your problems, can't you use a join and one query or even a
view?
HTH, Jochen
--
Jochen Daum - CANS Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/