RE: [PHP-WIN] Problem with procedures in MSSQL

From: Date: Fri, 20 Apr 2001 17:50:22 +0000
Subject: RE: [PHP-WIN] Problem with procedures in MSSQL
Groups: php.windows 
Request: Send a blank email to php-windows+get-6930@lists.php.net to get a copy of this message
First of all replace GO with RETURN(0) .... Then try again.... >-----Original Message----- >From: Hugo Alexandre Almeida Soares Dias [mailto:anikin@ip.pt] >Sent: Friday, April 20, 2001 7:22 PM >To: PHP-WIN >Subject: [PHP-WIN] Problem with procedures in MSSQL > > > >I created a stored procedure in MSSQL like this: >CREATE PROCEDURE destaques_relacionados @codigo_doc int, @relacao >varchar(20) AS >SELECT TOP 5 DN.cod, DN.titulo >FROM dbo.Keywords_associacoes KA INNER JOIN > dbo.Destaques_noticias DN ON >KA.documento = DN.cod >INNER JOIN > dbo.Associacoes A ON KA.associacao = A.cod >WHERE (KA.keyword IN > (SELECT keyword > FROM keywords_associacoes ka2, >associacoes a2 > WHERE ka2.documento = @codigo_doc AND >ka2.associacao = a2.cod AND a2.tabela = @relacao)) AND (KA.documento != >@codigo_doc) AND (A.tabela = 'Destaques') >GROUP BY KA.documento, DN.data, DN.cod, DN.titulo >ORDER BY COUNT(KA.keyword) DESC, DN.data DESC >GO > >This procedure when i execute it in the SQL Analyzer runs >instantaniously, >but in PHP hangs till timeout. >can anyone tell me what i must do to solve my problem? > > > > >Hugo Alexandre Dias >Eng. Sistemas Informática >anikin@ip.pt > >-- >PHP Windows Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net >For additional commands, e-mail: php-windows-help@lists.php.net >To contact the list administrators, e-mail: >php-list-admin@lists.php.net >

« previous php.windows (#6930) next »