I’m having a problem with a pdo->prepare statement giving me a sql error. Here’s the statement:


<?php
$srcs = glob(‘download/.tar.’);
$src = $srcs[count($srcs) - 1];
$srcname = basename($src);
$md5src = md5_file($src);

print_r ($srcname);
print_r ($md5src);

$php_scripts = ‘…/php/’;
require $php_scripts . ‘PDO_Connection_Select.php’;

if (!$pdo = PDOConnect(“foxclone_data”))
{
$chk=0;
}

$stmt = $pdo->prepare(“UPDATE files SET filename = ‘$srcname’, md5 = ‘$md5src’, logtime=now() WHERE id = 4”);
$stmt->execute() ;

I know it’s probably obvious, but I’ve been looking at this code for days and just not seeing it.

Thanks for your help.

    I'm not seeing the error either, since you didn't post it. Unless it's the choice of ‘’ instead of ' marks.

      Write a Reply...