PHP : PDOStatement::bindParam() expects parameter 3 to be long, string given

Posted 3 months ago by mostafalaravel

Hello , why this code return me this message :

PDOStatement::bindParam() expects parameter 3 to be long, string given

Here the code :

 try {

                                        $SetForeignKeyChecksZero = $DbConn->prepare("set foreign_key_checks = 0");
                                        $SetForeignKeyChecksZero->execute();
                                        $AccessRightsByTripletInsertQuery = $DbConn->prepare("insert into AccessRightsByTriplet 
                                        (DSTL1,DSTL2,DSTL3,AccessRightId,AccessRightsByGroupId) values(?,?,?,?,?)");
                                        $AccessRightsByTripletInsertQuery->bindParam('sssii',$TripletDataRow["DSTL1"],$TripletDataRow["DSTL2"],$AccessRightId,$AccessRightsByGroupId);
                                        $AccessRightsByTripletInsertQuery->execute();

                                         }

Please sign in or create an account to participate in this conversation.