All pastes #824984 Raw Edit

Untitled

public text v1 · immutable
#824984 ·published 2007-12-20 07:39 UTC
rendered paste body
/*Column Information For - EtnaTank.weight*/
--------------------------------------------

Field       Type      Collation  Null    Key     Default  Extra           Privileges                       Comment
----------  --------  ---------  ------  ------  -------  --------------  -------------------------------  -------
id          int(11)   (NULL)     NO      PRI     (NULL)   auto_increment  select,insert,update,references         
DataLinkID  int(11)   (NULL)     YES             (NULL)                   select,insert,update,references         
TimeStamp   datetime  (NULL)     YES             (NULL)                   select,insert,update,references         
Weight      float     (NULL)     YES             (NULL)                   select,insert,update,references         

/*Index Information For - EtnaTank.weight*/
-------------------------------------------

Table   Non_unique  Key_name  Seq_in_index  Column_name  Collation  Cardinality  Sub_part  Packed  Null    Index_type  Comment
------  ----------  --------  ------------  -----------  ---------  -----------  --------  ------  ------  ----------  -------
weight           0  PRIMARY              1  id           A                88821    (NULL)  (NULL)          BTREE              
weight           1  id                   1  id           A                88821    (NULL)  (NULL)          BTREE              

/*DDL Information For - EtnaTank.weight*/
-----------------------------------------

Table   Create Table                                                                           
------  ---------------------------------------------------------------------------------------
weight  CREATE TABLE `weight` (                                                                
          `id` int(11) NOT NULL auto_increment,                                                
          `DataLinkID` int(11) default NULL,                                                   
          `TimeStamp` datetime default NULL,                                                   
          `Weight` float default NULL,                                                         
          PRIMARY KEY  (`id`),                                                                 
          KEY `id` (`id`)                                                                      
        ) ENGINE=MyISAM AUTO_INCREMENT=89981 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci  

/* My Query */
 
SELECT * FROM `weight` WHERE DataLinkID='23' ORDER BY id DESC LIMIT 0,1