column does not exist

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Leviathan73
    replied
    wap2k Thank you for your patience, it works

    Leave a comment:


  • wap2k
    replied
    Originally posted by Leviathan73 View Post
    it replaced, now there is this
    Unknown column 'catid' in 'field list'
    Originally posted by Leviathan73 View Post
    it replaced, now there is this
    Unknown column 'catid' in 'field list'

    it is the same thing missing fields in the SQL run this command

    PHP Code:
    ALTER TABLE `trivia` ADD `catid` INT( 255 ) NOT NULL 
    
    or delete the old table and replace with

    PHP Code:
    CREATE TABLE `trivia` (
      `trivia_id` int(4) unsigned zerofill NOT NULL auto_increment,
      `question` text NOT NULL,
      `answer` varchar(100) NOT NULL default '',
      `alternative1` varchar(100) default NULL,
      `alternative2` varchar(100) default NULL,
      `catname` varchar(100) default NULL,
      `catid` int(255) NOT NULL,
      PRIMARY KEY  (`trivia_id`)
    ); 
    
    I could fix it for you with the script just have to look through it. Could create a full table as is required.

    Leave a comment:


  • Leviathan73
    replied
    it replaced, now there is this
    Unknown column 'catid' in 'field list'

    Leave a comment:


  • wap2k
    replied
    Originally posted by Leviathan73 View Post
    Now I checked this
    Unknown column 'catname' in 'field list'
    Run this command

    PHP Code:
    ALTER TABLE `trivia` ADD `catname` TEXT NOT NULL 
    
    or delete the old table and replace with

    PHP Code:
    CREATE TABLE `trivia` (
      `trivia_id` int(4) unsigned zerofill NOT NULL auto_increment,
      `question` text NOT NULL,
      `answer` varchar(100) NOT NULL default '',
      `alternative1` varchar(100) default NULL,
      `alternative2` varchar(100) default NULL,
      `catname` varchar(100) default NULL,
      PRIMARY KEY  (`trivia_id`)
    ); 
    
    I could fix it for you with the script just have to look through it. Could create a full table as is required.
    Last edited by wap2k; 12.06.11, 14:23.

    Leave a comment:


  • Leviathan73
    replied
    Now I checked this
    Unknown column 'catname' in 'field list'

    Leave a comment:


  • wap2k
    replied
    You are missing the trivia table try this

    PHP Code:
    CREATE TABLE `trivia` (
      `trivia_id` int(4) unsigned zerofill NOT NULL auto_increment,
      `question` text NOT NULL,
      `answer` varchar(100) NOT NULL default '',
      `alternative1` varchar(100) default NULL,
      `alternative2` varchar(100) default NULL,
      PRIMARY KEY  (`trivia_id`)
    ); 
    
    Last edited by wap2k; 12.06.11, 13:05.

    Leave a comment:


  • Leviathan73
    replied
    do not understand, as I do?
    PHP Code:
    --
    -- Dumping data for table `trivia`
    --
    LOCK TABLES `trivia` WRITE;
    /*!40000 ALTER TABLE `trivia` DISABLE KEYS */;
    /*!40000 ALTER TABLE `trivia` ENABLE KEYS */;
    UNLOCK TABLES;
    --
    -- Table structure for table `trivia1`
    --
    DROP TABLE IF EXISTS `trivia1`;
    /*!40101 SET @saved_cs_client     = @@character_set_client */;
    /*!40101 SET character_set_client = utf8 */;
    CREATE TABLE `trivia1` (
      `id` int(11) NOT NULL auto_increment,
      `uid` text NOT NULL,
      `mesaj` text NOT NULL,
      `identificare` text,
      `raspuns` text,
      `timp` text NOT NULL,
      `valid` text,
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM AUTO_INCREMENT=2427700 DEFAULT CHARSET=utf8;
    /*!40101 SET character_set_client = @saved_cs_client */;
    --
    -- Dumping data for table `trivia1`
    --
    LOCK TABLES `trivia1` WRITE;
    /*!40000 ALTER TABLE `trivia1` DISABLE KEYS */;
    /*!40000 ALTER TABLE `trivia1` ENABLE KEYS */;
    UNLOCK TABLES;
    --
    -- Table structure for table `trivia3`
    --
    DROP TABLE IF EXISTS `trivia3`;
    /*!40101 SET @saved_cs_client     = @@character_set_client */;
    /*!40101 SET character_set_client = utf8 */;
    CREATE TABLE `trivia3` (
      `id` int(11) NOT NULL auto_increment,
      `uid` text NOT NULL,
      `mesaj` text NOT NULL,
      `identificare` text,
      `raspuns` text,
      `timp` text NOT NULL,
      `valid` text,
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM AUTO_INCREMENT=2429498 DEFAULT CHARSET=utf8;
    /*!40101 SET character_set_client = @saved_cs_client */;
    --
    -- Dumping data for table `trivia3`
    --
    LOCK TABLES `trivia3` WRITE;
    /*!40000 ALTER TABLE `trivia3` DISABLE KEYS */;
    /*!40000 ALTER TABLE `trivia3` ENABLE KEYS */;
    UNLOCK TABLES;
    --
    -- Table structure for table `trivia5`
    --
    DROP TABLE IF EXISTS `trivia5`;
    /*!40101 SET @saved_cs_client     = @@character_set_client */;
    /*!40101 SET character_set_client = utf8 */;
    CREATE TABLE `trivia5` (
      `id` int(11) NOT NULL auto_increment,
      `uid` text NOT NULL,
      `mesaj` text NOT NULL,
      `identificare` text,
      `raspuns` text,
      `timp` text NOT NULL,
      `valid` text,
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM AUTO_INCREMENT=2330753 DEFAULT CHARSET=utf8;
    /*!40101 SET character_set_client = @saved_cs_client */;
    --
    -- Dumping data for table `trivia5`
    --
    LOCK TABLES `trivia5` WRITE;
    /*!40000 ALTER TABLE `trivia5` DISABLE KEYS */;
    /*!40000 ALTER TABLE `trivia5` ENABLE KEYS */;
    UNLOCK TABLES;
    --
    -- Table structure for table `trivia6`
    --
    DROP TABLE IF EXISTS `trivia6`;
    /*!40101 SET @saved_cs_client     = @@character_set_client */;
    /*!40101 SET character_set_client = utf8 */;
    CREATE TABLE `trivia6` (
      `id` int(11) NOT NULL auto_increment,
      `uid` text NOT NULL,
      `mesaj` text NOT NULL,
      `identificare` text,
      `raspuns` text,
      `timp` text NOT NULL,
      `valid` text,
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM AUTO_INCREMENT=2401144 DEFAULT CHARSET=utf8;
    /*!40101 SET character_set_client = @saved_cs_client */;
    --
    -- Dumping data for table `trivia6`
    --
    LOCK TABLES `trivia6` WRITE;
    /*!40000 ALTER TABLE `trivia6` DISABLE KEYS */;
    /*!40000 ALTER TABLE `trivia6` ENABLE KEYS */;
    UNLOCK TABLES;
    --
    -- Table structure for table `trivia7`
    --
    DROP TABLE IF EXISTS `trivia7`;
    /*!40101 SET @saved_cs_client     = @@character_set_client */;
    /*!40101 SET character_set_client = utf8 */;
    CREATE TABLE `trivia7` (
      `id` int(11) NOT NULL auto_increment,
      `uid` text NOT NULL,
      `mesaj` text NOT NULL,
      `identificare` text,
      `raspuns` text,
      `timp` text NOT NULL,
      `valid` text,
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM AUTO_INCREMENT=2330752 DEFAULT CHARSET=utf8;
    /*!40101 SET character_set_client = @saved_cs_client */;
    --
    -- Dumping data for table `trivia7`
    --
    LOCK TABLES `trivia7` WRITE;
    /*!40000 ALTER TABLE `trivia7` DISABLE KEYS */;
    /*!40000 ALTER TABLE `trivia7` ENABLE KEYS */;
    UNLOCK TABLES; 
    

    Leave a comment:


  • nclemale36
    replied
    id suggest adding the field to your table .looks like the id field to me with trivia_ added to the start lol . make sure its auto increment

    Leave a comment:


  • Leviathan73
    started a topic column does not exist

    column does not exist

    hello, anyone has this table of trivia?
    PHP Code:
    $sql2 = mysql_query("SELECT trivia_id, question, answer, alternative1, alternative2 from trivia where trivia_id = $trivia_id"); 
    
    when I add the questions tells me .. Unknown column 'trivia_id' in 'field list'
Working...
X