Jump to content

Ragnarok

Members
  • Posts

    4
  • Joined

  • Last visited

About Ragnarok

  • Birthday 04/12/1987

Contact Methods

  • AIM
    Ragnarok SH
  • MSN
    ragnarok@squarehybrid.com
  • Website URL
    http://www.squarehybrid.com/

Profile Information

  • Gender
    Not Telling

Ragnarok's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank-you very much for your help
  2. I meen like if I have a table like this id|date page1|2006-01-13 page2|2006-01-26 page1|2006-01-26 page3|2006-02-05 page2|2006-02-09 it would find that there are 3 unique id (page1, page2, page3) names and only count those id names
  3. I have been thinking, all I really need to do is count the different ids, it doesn't matter which date goes with it. Is it posible to do it that way? Also would this way be faster?
  4. I am doing a versioning system so that every time you edit a page, the old page is still kept but the new page is shown insted. I have that working find but when I am trying to list the pages I am having problems getting a query to do it. I have a table like this: [code]CREATE TABLE `pages` (   `id` varchar(25) NOT NULL default '',   `date` datetime NOT NULL default '0000-00-00 00:00:00',   `title` varchar(25) NOT NULL default '',   `content` mediumtext NOT NULL,   PRIMARY KEY  (`id`,`date`),   FULLTEXT KEY `Search` (`title`,`content`) );[/code] I want to count all of the ID's with the most recent date. I have tried: [code]SELECT COUNT(*) as total FROM pages GROUP BY date HAVING MAX(date)[/code] returns 0 [code]SELECT COUNT(MAX(date)) FROM pages GROUP BY date[/code] but that returns this error [code]#1111 - Invalid use of group function[/code] Does anyone know of a solution?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.