Это использование кода PHP. Я хочу извлечь из базы данных только детали userProfession = «Учитель», как мне это достичь?
$stmt = $DB_con->prepare('SELECT userID, userName, userProfession, userPic FROM tbl_users ORDER BY userID DESC'); $stmt->execute(); if($stmt->rowCount() > 0) { while($row=$stmt->fetch(PDO::FETCH_ASSOC)) { extract($row); ?> <div class="col-xs-3"> <p class="page-header"><?php echo $userName." / ".$userProfession; ?></p> <img src="user_images/<?php echo $row['userPic']; ?>" class="img-rounded" width="250px" height="250px" /> <p class="page-header"> <span> <a class="btn btn-info" href="editform.php?edit_id=<?php echo $row['userID']; ?>" title="click for edit" onclick="return confirm('sure to edit ?')"><span class="glyphicon glyphicon-edit"></span> Edit</a> <a class="btn btn-danger" href="?delete_id=<?php echo $row['userID']; ?>" title="click for delete" onclick="return confirm('sure to delete ?')"><span class="glyphicon glyphicon-remove-circle"></span> Delete</a> </span> </p> </div>