diff options
author | Fabio Varesano <fax8@13637.no-reply.drupal.org> | 2007-01-03 17:20:52 +0000 |
---|---|---|
committer | Fabio Varesano <fax8@13637.no-reply.drupal.org> | 2007-01-03 17:20:52 +0000 |
commit | 45c0491dcf41c537595fdb465625aee806c9f390 (patch) | |
tree | 80c4d79685ff61bff8b51fe88da9cf8ea9eb96c4 | |
parent | 59acb1f54903724e15eed28e47b568f6054442f2 (diff) | |
download | video-45c0491dcf41c537595fdb465625aee806c9f390.tar.gz video-45c0491dcf41c537595fdb465625aee806c9f390.tar.bz2 |
Added support for postgresql.
-rw-r--r-- | video.install | 29 | ||||
-rw-r--r-- | video.module | 2 |
2 files changed, 30 insertions, 1 deletions
diff --git a/video.install b/video.install index 7c946b6..a8e4c6f 100644 --- a/video.install +++ b/video.install @@ -31,6 +31,35 @@ function video_install() { serialized_data text NULL default NULL, PRIMARY KEY (vid) ) TYPE=MyISAM COMMENT='size is in bytes' /*!40100 DEFAULT CHARACTER SET utf8 */;"); + break; + case 'pgsql': + db_query("CREATE TABLE {video} ( + vid integer NOT NULL default '0', + nid integer NOT NULL default '0', + vidfile text NOT NULL default '', + videox smallint NOT NULL default '0', + videoy smallint NOT NULL default '0', + size bigint default NULL, + download_counter integer NOT NULL default '0', + play_counter integer NOT NULL default '0', + video_bitrate integer default NULL, + audio_bitrate integer default NULL, + audio_sampling_rate integer default NULL, + audio_channels varchar(10) default NULL, + playtime_seconds integer default NULL, + download_folder varchar(255) NULL default NULL, + disable_multidownload smallint NOT NULL default '0', + use_play_folder smallint NOT NULL default '0', + custom_field_1 varchar(255) NULL default NULL, + custom_field_2 varchar(255) NULL default NULL, + custom_field_3 varchar(255) NULL default NULL, + custom_field_4 varchar(255) NULL default NULL, + custom_field_5 text NULL default NULL, + custom_field_6 text NULL default NULL, + serialized_data text NULL default NULL, + PRIMARY KEY (vid) + );"); + } } diff --git a/video.module b/video.module index 1f1f811..c906261 100644 --- a/video.module +++ b/video.module @@ -753,7 +753,7 @@ function video_block_list($delta = 0) { $orderby = 'RAND()'; break; } - return node_title_list(db_query_range(db_rewrite_sql("SELECT n.nid, n.title FROM {node} n INNER JOIN {video} v ON n.vid = v.vid WHERE n.type = 'video' AND n.status = 1 AND n.moderate = 0 ORDER BY $orderby DESC"),0, $count)); + return node_title_list(db_query_range(db_rewrite_sql("SELECT n.nid, n.title, $orderby FROM {node} n INNER JOIN {video} v ON n.vid = v.vid WHERE n.type = 'video' AND n.status = 1 AND n.moderate = 0 ORDER BY $orderby DESC"),0, $count)); } /**************************************************** |