Created
May 21, 2018 13:58
-
-
Save faiyazalam/db62b4a7f043362fb713b3359ea04cdb to your computer and use it in GitHub Desktop.
Raw sql query using Pimcore\Db class in PIMCORE 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Pimcore\Db; | |
$sql = "SELECT * from table_name where`id` = ?"; | |
$stmt = Db::get()->prepare($sql); | |
$stmt->bindParam(1, 101, \PDO::PARAM_INT); | |
$stmt->execute(); | |
$result = $stmt->fetchAll(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment