Re: Re: Converting to a sting

From: Date: Fri, 26 Jul 2002 15:24:51 +0000
Subject: Re: Re: Converting to a sting
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-14974@lists.php.net to get a copy of this message
You shouldn't have to change it to a string. The problem is more than likely your SQL statement itself. To insert a string in a database you need to do the following: $strSQL = "INSERT INTO {TABLE} VALUES('$myVar', '$myothervar')"; Notice the ' marks surrounding the variables, this tells MySQL that you want to use these as strings. You can also use " if you would like. -- Scott Carr OpenOffice.org Documentation Maintainer http://documentation.openoffice.org/ Quoting Brian McGarvie <brian.mcgarvie@anypurposeloans.co.uk>: > you can use the following: > > $myVar = (string) $myVar; > > Also look up... > > http://www.php.net/manual/en/function.settype.php > > "R.S. Herhuth" <ronherhuth@pop.mindspring.com> wrote in message > news:3D415F9F.6665846C@pop.mindspring.com... > > > > In order to please MSSQL I have a situation where I must turn a result > > into string before SQL will accept it. Is there a command I can use to > > convert a numeric into a string that SQL will accept? > > > > RON > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/

« previous php.windows (#14974) next »