RE: [PHP] binding data type error
| From: | hadi | Date: | Fri, 17 Apr 2015 02:33:18 +0000 |
| Subject: | RE: [PHP] binding data type error | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-324813@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Aziz Saleh [mailto:azizsaleh@gmail.com]
> Sent: Friday, April 17, 2015 5:20 AM
> To: hadi
> Cc: PHP General
> Subject: Re: [PHP] binding data type error
>
> On Thu, Apr 16, 2015 at 10:02 PM, hadi <almarzuki2011@hotmail.com> wrote:
>
> > Hi dear list,
> >
> >
> > i have php script with Microsoft database. im trying to bind
> > SQLSRV_SQLTYPE_NVARCHAR('max') but im getting error Fatal error:
> > Unknown
> > PDO::PARAM_* constant given
> >
> > here is my code
> >
> > $stmt = $con->prepare('insert into [feedtable]
> > (title,link,pubdata,description,category,image,imagelink,source)
> > values
> (:title,:link,:pubdata,:description,:category,:image,:imagelink,:source)');
> >
> > $stmt->bindParam(':title',$item-
> >title,SQLSRV_SQLTYPE_NVARCHAR('max'))
> > ;
> > $stmt->execute();
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
> > http://www.php.net/unsub.php
> >
> >
> The allowed PDO params list:
>
> http://php.net/manual/en/pdo.constants.php
>
> I think you are trying to use this instead (mixing it with PDO):
>
> http://php.net/manual/en/book.sqlsrv.php
>
> What are you trying to do here?
Im trying to insert data to mssql with " SQLSRV_SQLTYPE_NVARCHAR('max')".
I already have the links which you post.