mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-12-01 02:27:24 +01:00
Insert into posts table using named columns.
Makes it easier to update the posts table schema.
This commit is contained in:
parent
5628f78970
commit
90ada24ddc
@ -697,7 +697,7 @@ function threadExists($id) {
|
|||||||
|
|
||||||
function post(array $post) {
|
function post(array $post) {
|
||||||
global $pdo, $board;
|
global $pdo, $board;
|
||||||
$query = prepare(sprintf("INSERT INTO `posts_%s` VALUES ( NULL, :thread, :subject, :email, :name, :trip, :capcode, :body, :body_nomarkup, :time, :time, :thumb, :thumbwidth, :thumbheight, :file, :width, :height, :filesize, :filename, :filehash, :password, :ip, :sticky, :locked, 0, :embed)", $board['uri']));
|
$query = prepare(sprintf("INSERT INTO `posts_%s` (`id`, `thread`, `subject`, `email`, `name`, `trip`, `capcode`, `body`, `body_nomarkup`, `time`, `bump`, `thumb`, `thumbwidth`, `thumbheight`, `file`, `filewidth`, `fileheight`, `filesize`, `filename`, `filehash`, `password`, `ip`, `sticky`, `locked`, `sage`, `embed`) VALUES ( NULL, :thread, :subject, :email, :name, :trip, :capcode, :body, :body_nomarkup, :time, :time, :thumb, :thumbwidth, :thumbheight, :file, :width, :height, :filesize, :filename, :filehash, :password, :ip, :sticky, :locked, 0, :embed)", $board['uri']));
|
||||||
|
|
||||||
// Basic stuff
|
// Basic stuff
|
||||||
if (!empty($post['subject'])) {
|
if (!empty($post['subject'])) {
|
||||||
|
Loading…
Reference in New Issue
Block a user