corneyflorex/TaskBoard — comment on commit 883a96855af76bdcb153f1564c3b6c6b60454a69
File: Database.php line 68
By corneyflorex:

Dang... That's a bit late. But I think I find that 'explicitly' preparing each value to be much more safer according to what I read online. Also it is a lot less headache.

one thing I would change is I would modify the $dataType array to be an associative array, so that I am always aware of what each table represents.

$data = array(
'created' => time(),
'bumped' => time(),
'title' => $title,
'message' => $message,
'tripcode' => $tripcode,
'status' => $this::TASK_OPEN,
'image' => $imageBinary,
'imagetype' => __image_file_type_from_binary($imageBinary),
'file' => $fileBinary
);

//Data types to put into the database
$dataType = array(
'INT',
'INT',
'STR',
'STR',
'STR',
'INT',
'LARGEOBJECT',
'STR',
'LARGEOBJECT'
);