convert a string to integer



Hi,

i know this topic is obvious but i have a strange behavior and i'm getting
crazy.

my stored procedure returns me a string.
string can be an email or a message error => '-1', '-2', '-3'

when i check if the string contains only digit, i use ctype_digit(mystring)
but any way it returns me false... i suppose that for -1, -2, -3 the "-" is
taken as character and not a digit.
i tried also to cast it before into integer thanks
ctype_digit((int)mystring), but it does not work.

so how can i solve this issue ?

thx

--
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008


Relevant Pages

  • Re: [PHP] convert a string to integer
    ... crazy. ... my stored procedure returns me a string. ... taken as character and not a digit. ...
    (php.general)
  • RE: SQL stored procedure executing twice
    ... from one parent record to another. ... Dim stDocName As String ... My pass-thru query syntax going to stored procedure ...
    (microsoft.public.access.modulesdaovba)
  • RE: MS Query "Connections"
    ... handle that with my connection string. ... for using the stored procedure route is that it is faster. ... If you truly want to pass in the query string, ...
    (microsoft.public.excel.programming)
  • Re: XML binding advice
    ... Performance - By writing the SQL statement as a stored procedure, ... execution plan will take into account any indexes you have on the tables ... each piece you add to the string. ...
    (microsoft.public.dotnet.xml)
  • Re: TableAdapter specifing IN in the where clause for list of id
    ... And till now, there products which are huge products, they are using AD-HOC ... Since IN cannot accept a delimited string but ... Muhammad replied that I could use a stored procedure to accomplish this ... specify. ...
    (microsoft.public.dotnet.framework.adonet)