bindparam php

Solutions on MaxInterview for bindparam php by the best coders in the world

showing results for - "bindparam php"
Valentina
20 Feb 2016
1<?php
2/* Exécution d'une requête préparée en liant des variables PHP */
3$calories = 150;
4$couleur = 'rouge';
5$sth = $dbh->prepare('SELECT nom, couleur, calories
6    FROM fruit
7    WHERE calories < ? AND couleur = ?');
8$sth->bindParam(1, $calories, PDO::PARAM_INT);
9$sth->bindParam(2, $couleur, PDO::PARAM_STR, 12);
10$sth->execute();
11?>