1//on sql server
2public function get_data_from($id){
3 $request = "SELECT * FROM yourTable WHERE id = ?";
4
5 //preparing the request
6 $stmt = $this->dbh->prepare($request);
7
8 //executing the request
9 $stmt->execute( array($id) );
10
11 //fetching the result of the request
12 $result = $stmt->fetchAll();
13
14 return $result;
15}