Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

GodziLaravel's avatar

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

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();

                                         }
0 likes
0 replies

Please or to participate in this conversation.