Skip to content

Commit cdf29b0

Browse files
committed
New method of calling SQL file and sending parameters
1 parent a2272e7 commit cdf29b0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

SQLQuery.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,18 @@ public function openFile($sqlFileName)
139139
return $this;
140140
}
141141

142+
/**
143+
* @param string $name name of SQLFile
144+
* @param array $arguments list of sql params
145+
*/
146+
public function __call($name, $arguments)
147+
{
148+
$this->openFile($name);
149+
foreach ($arguments[0] as $key => $argument) {
150+
$this->__set($key, $argument);
151+
}
152+
}
153+
142154
/**
143155
*
144156
* @param string $parameterName

0 commit comments

Comments
 (0)