From 170b674a0953ce95e06f7a8442eb0f1097e7ee72 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 16 Mar 2003 07:02:20 +0000 Subject: - All LIMIT queries must go through the pager or through db_query_range(). The syntax for db_query_range() was enhanced so it matches db_query(). So you may pass extra arguments of the SQL statement which are checked via check_query() and then substituted into the SQL statement. After these optional arguments, you always pass $from and $count parameters which define your range. Most often, the $from is 0 and the count is the max number of records you want returned. Patch by Moshe. - The pager_query() function for PEAR was enhanced so that it adds proper GROUP BY statement counting the number of records to be paged. Patch by James Arthur. - MSSQL database scheme by Moshe. --- database/database.mysql | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'database/database.mysql') diff --git a/database/database.mysql b/database/database.mysql index b99b67951..859a2b928 100644 --- a/database/database.mysql +++ b/database/database.mysql @@ -104,7 +104,6 @@ CREATE TABLE cache ( cid varchar(255) NOT NULL default '', data mediumtext, expire int(11) NOT NULL default '0', - created int(11) NOT NULL default '0', PRIMARY KEY (cid) ) TYPE=MyISAM; @@ -167,11 +166,9 @@ CREATE TABLE feed ( CREATE TABLE forum ( nid int(10) unsigned NOT NULL default '0', - tid int(10) unsigned NOT NULL default '0', icon varchar(255) NOT NULL default '', shadow int(10) unsigned NOT NULL default '0', - PRIMARY KEY (nid), - KEY tid (tid) + PRIMARY KEY (nid) ) TYPE=MyISAM; -- @@ -239,8 +236,8 @@ CREATE TABLE moderation_roles ( rid int(10) unsigned NOT NULL default '0', mid int(10) unsigned NOT NULL default '0', value tinyint(4) NOT NULL default '0', - KEY rid (rid), - KEY mid (mid) + KEY idx_rid (rid), + KEY idx_mid (mid) ) TYPE=MyISAM; -- @@ -541,7 +538,6 @@ CREATE TABLE watchdog ( uid int(10) NOT NULL default '0', type varchar(16) NOT NULL default '', message text NOT NULL, - link varchar(255) NOT NULL default '', location varchar(128) NOT NULL default '', hostname varchar(128) NOT NULL default '', timestamp int(11) NOT NULL default '0', -- cgit v1.2.3