News:

Please note these forums are mostly a testing ground for my SMF work and I don't really use them otherwise.

Main Menu

Paste-1217796894:v:use_geshi-1:v:type-php

Started by Buggy, Aug 03, 2008, 08:54 PM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

Buggy

<?php
require("SSI.php");

db_extend('packages');

$columns_to_insert = array(
   array('name' => 'id_log_karma', 'type' => 'mediumint', 'size' => 8, 'null' => 0, 'auto' => 1),
   array('name' => 'id_msg', 'type' => 'int', 'size' => 10, 'null' => 0, 'default' => 0, 'auto' => 0),
   array('name' => 'comment', 'type' => 'varchar', 'size' => 255, 'null' => 0, 'auto' => 0),
   array('name' => 'id_giver', 'type' => 'mediumint', 'size' => 8, 'null' => 0, 'default' => 0, 'auto' => 0),
   array('name' => 'id_receiver', 'type' => 'mediumint', 'size' => 8, 'null' => 0, 'default' => 0, 'auto' => 0),
   array('name' => 'user_smited', 'type' => 'tinyint', 'size' => 4, 'null' => 0, 'default' => 0, 'auto' => 0),
   array('name' => 'total_points', 'type' => 'tinyint', 'size' => 4, 'null' => 0, 'default' => 0, 'auto' => 0),
   array('name' => 'karma_time', 'type' => 'int', 'size' => 10, 'null' => 0, 'default' => 0, 'auto' => 0),
);

$smcFunc['db_create_table']
(
   'karma_requests', // Table name
   $columns_to_insert,
   array // Indices
   (
      array // Add primary columns
      (
         'type' => 'primary', 'columns' =>  array('id_entry'),
      )
   )
);

?>