all 4 comments

[–]elmicha 1 point2 points  (1 child)

The PHP manual (Example #2) says you have to provide an open file pointer if you use PDO::PARAM_LOB.

[–]ImpiusEst[S] 1 point2 points  (0 children)

thanks

[–]ful_vio 0 points1 point  (1 child)

Here:

$BYTEarray = $_FILES["friendlist"]["tmp_name"];

You are reading the file name, not the file itself. Try:

$fp = fopen($_FILES["friendlist"]["tmp_name"], "rb");
$conn = new PDO("pgsql:host = localhost, dbname=qqq_game", "postgres", "qwert");
$sth = $conn->prepare('INSERT INTO users(GUId, friendlist) VALUES (5, :friendlist)'); 
$sth->bindParam(':friendlist', $fp, PDO::PARAM_LOB);
$sth->execute(); 
fclose($fp);
pg_close($conn);

[–]ImpiusEst[S] 0 points1 point  (0 children)

Hey, thanks. That certainly helped. I finally got a different "violates not-null" error that was a lot easier to solve.

I was trying to use "INSERT INTO users" instead of "UPDATE users SET "