I think that this should be a simple problem but I can not see it.
$SQL = "Select `id` from `fileStore` WHERE `uid` = ':UID' and `offset` = :OFFSET";
$InPut = array(':UID' => $LocArr[0],':OFFSET' => $LocArr[1]);
echo(str_replace(array_flip($InPut),$InPut,$SQL));
$stmt = $db->prepare($SQL);
$stmt->execute($InPut);
The Echo line gives me.
Select `id` from `fileStore` WHERE `uid` = '20151009162211-909549588' and `offset` = 1
Which I can run against the database. But I get the error.
Fatal error:
Uncaught exception 'PDOException' with message
'SQLSTATE[HY093]: Invalid parameter number: parameter was not defined'
in filepath\UploadParser.php:
117 Stack trace: #0 filepath\UploadParser.php(117):
PDOStatement->execute(Array) #1 {main} thrown in filepath\UploadParser.php on line 117