Skip to content

Commit

Permalink
[pre] - sql query bulder
Browse files Browse the repository at this point in the history
  • Loading branch information
iloElias committed Aug 26, 2024
1 parent cdb891c commit 5bf3a0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Abstract/Sql.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ abstract class Sql
{
public abstract function getSql(): string;
public abstract function getParameters(): array;
public function bindParameters(): void
public function bindParameters(): string
{
$params = $this->getParameters();
$stmt = $this->getSql();
foreach ($params as $key => $value) {
$stmt = str_replace($key, $value, $stmt);
}
return $stmt;
}
}

0 comments on commit 5bf3a0e

Please sign in to comment.