Re: Checking for result of call to mssql_query()

From: Date: Fri, 13 Oct 2006 07:34:43 +0000
Subject: Re: Checking for result of call to mssql_query()
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-27236@lists.php.net to get a copy of this message
Niel Archer wrote: > Hi Alf > > You'd be better off asking this type of question in the database list. > I'm not familiar with MS-SQL, the syntax doesn't look much different to > the MySQL flavour. > > When you say " whether the query works or not" do you mean the query is > failing with an error, or it simply returns no data? I'd suggest you > test for TRUE first to determine if the query suceeded, but returned no > data. If that fails, test for FALSE. > > The problem is that the code if ($Reply == FALSE) does what I expect with mysql but not with mssql. I will test the other way around and see what happens. i.e. if (!$Reply) { ........error message....... } -- Regards, Alf Stockton www.stockton.co.za Q: "What is the burning question on the mind of every dyslexic existentialist?" A: "Is there a dog?" My email disclaimer is available at www.stockton.co.za/disclaimer.html

« previous php.windows (#27236) next »