| @@ 142-163 (lines=22) @@ | ||
| 139 | * |
|
| 140 | * @return ChildTask A model object, or null if the key is not found |
|
| 141 | */ |
|
| 142 | protected function findPkSimple($key, ConnectionInterface $con) |
|
| 143 | { |
|
| 144 | $sql = 'SELECT id, created_at, updated_at FROM tasks WHERE id = :p0'; |
|
| 145 | try { |
|
| 146 | $stmt = $con->prepare($sql); |
|
| 147 | $stmt->bindValue(':p0', $key, PDO::PARAM_INT); |
|
| 148 | $stmt->execute(); |
|
| 149 | } catch (Exception $e) { |
|
| 150 | Propel::log($e->getMessage(), Propel::LOG_ERR); |
|
| 151 | throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e); |
|
| 152 | } |
|
| 153 | $obj = null; |
|
| 154 | if ($row = $stmt->fetch(\PDO::FETCH_NUM)) { |
|
| 155 | /** @var ChildTask $obj */ |
|
| 156 | $obj = new ChildTask(); |
|
| 157 | $obj->hydrate($row); |
|
| 158 | TaskTableMap::addInstanceToPool($obj, (string) $key); |
|
| 159 | } |
|
| 160 | $stmt->closeCursor(); |
|
| 161 | ||
| 162 | return $obj; |
|
| 163 | } |
|
| 164 | ||
| 165 | /** |
|
| 166 | * Find object by primary key. |
|
| @@ 162-183 (lines=22) @@ | ||
| 159 | * |
|
| 160 | * @return ChildUser A model object, or null if the key is not found |
|
| 161 | */ |
|
| 162 | protected function findPkSimple($key, ConnectionInterface $con) |
|
| 163 | { |
|
| 164 | $sql = 'SELECT id, name, email, password, remember_token, created_at, updated_at FROM users WHERE id = :p0'; |
|
| 165 | try { |
|
| 166 | $stmt = $con->prepare($sql); |
|
| 167 | $stmt->bindValue(':p0', $key, PDO::PARAM_INT); |
|
| 168 | $stmt->execute(); |
|
| 169 | } catch (Exception $e) { |
|
| 170 | Propel::log($e->getMessage(), Propel::LOG_ERR); |
|
| 171 | throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e); |
|
| 172 | } |
|
| 173 | $obj = null; |
|
| 174 | if ($row = $stmt->fetch(\PDO::FETCH_NUM)) { |
|
| 175 | /** @var ChildUser $obj */ |
|
| 176 | $obj = new ChildUser(); |
|
| 177 | $obj->hydrate($row); |
|
| 178 | UserTableMap::addInstanceToPool($obj, (string) $key); |
|
| 179 | } |
|
| 180 | $stmt->closeCursor(); |
|
| 181 | ||
| 182 | return $obj; |
|
| 183 | } |
|
| 184 | ||
| 185 | /** |
|
| 186 | * Find object by primary key. |
|
| @@ 147-168 (lines=22) @@ | ||
| 144 | * |
|
| 145 | * @return ChildSelfprice A model object, or null if the key is not found |
|
| 146 | */ |
|
| 147 | protected function findPkSimple($key, ConnectionInterface $con) |
|
| 148 | { |
|
| 149 | $sql = 'SELECT id, name, datecreate, desc FROM selfprice WHERE id = :p0'; |
|
| 150 | try { |
|
| 151 | $stmt = $con->prepare($sql); |
|
| 152 | $stmt->bindValue(':p0', $key, PDO::PARAM_INT); |
|
| 153 | $stmt->execute(); |
|
| 154 | } catch (Exception $e) { |
|
| 155 | Propel::log($e->getMessage(), Propel::LOG_ERR); |
|
| 156 | throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e); |
|
| 157 | } |
|
| 158 | $obj = null; |
|
| 159 | if ($row = $stmt->fetch(\PDO::FETCH_NUM)) { |
|
| 160 | /** @var ChildSelfprice $obj */ |
|
| 161 | $obj = new ChildSelfprice(); |
|
| 162 | $obj->hydrate($row); |
|
| 163 | SelfpriceTableMap::addInstanceToPool($obj, (string) $key); |
|
| 164 | } |
|
| 165 | $stmt->closeCursor(); |
|
| 166 | ||
| 167 | return $obj; |
|
| 168 | } |
|
| 169 | ||
| 170 | /** |
|
| 171 | * Find object by primary key. |
|