Czy taki sposób bindowania jest poprawny/bezpieczny?
<?php $thisPage = 'offer'; ## DISPLAY PAGE ## if($categoryId && $itemId) { ## DATA ## $sql = $pdo->prepare('SELECT id, title_'.$_lang.', text_'.$_lang.', category, promotions, photo FROM '.$thisPage.' WHERE id=:id AND category=:category AND status="1" '); $sql->bindParam(':id', $itemId, PDO::PARAM_INT); $sql->bindParam(':category', $categoryId, PDO::PARAM_INT); $sql->execute(); $data = $sql->fetchAll(); $sql->closeCursor(); $smarty->assign('data',$data); ## DISPLAY TEMPLATE ## $smarty->display('templates/public/'.$thisPage.'_item.tpl'); } else { //dalszy kod }