RE: [PHP-DB] Query problem with MS SQL on NT4

From: Date: Fri, 24 Nov 2000 10:52:25 +0000
Subject: RE: [PHP-DB] Query problem with MS SQL on NT4
Groups: php.db 
Request: Send a blank email to php-db+get-4711@lists.php.net to get a copy of this message
Hi there, I've had similar problems when working with PHP and MS-SQL, I "solved" it by using Stored Procedures instead. Write your query as a stored procedure (name it spMaxPiclist) and execute it like this: $maxSel = "EXEC spMaxPiclist \"$UID\""; Works wonderful for me! -Bj -----Original Message----- From: Joe Linger [mailto:jlinger@delphi.com] Sent: Thursday, November 23, 2000 9:22 PM To: ML-PHP-DB Subject: [PHP-DB] Query problem with MS SQL on NT4 The following query is successful in MS SQL query analyzier, but fails in php code. $maxSel = "Select * from piclist where UID = (select max(UID) from piclist)"; $rs2 = mssql_query($maxSel); Can anyone shed some light on this? Thanks. Joe Linger -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#4711) next »