List:General Discussion« Previous MessageNext Message »
From:曹凯 Date:February 1 2010 9:25am
Subject:RE: how to get the name of primary key ?
View as plain text  

Hi Thiyaghu,

I have already got the last_insert_id. now I wanna know if there are any variables or
constants to instead of game_log's primary key cos I don't know its name.






> Date: Mon, 1 Feb 2010 14:24:59 +0530
> Subject: Re: how to get the name of primary key ?
> From: theyahoock@stripped
> To: txdyc@stripped
> CC: mysql@stripped
> 
> Hi,
> 
> Use
> 
> *SELECT * FROM game_log WHERE this_table's_PK = last_insert_id()*
> 
> It will help you.
> 
> Regards,
> Thiyaghu CK,
> MySQL DBA
> www.mafiree.com
> 
> 2010/2/1 曹凯 <txdyc@stripped>
> 
> >
> > Hi all,
> >
> > if we just know the table name but don't know the name of primary key, is
> > there any variables or constants could instead of the PK?
> >
> > for example:
> >
> > there is a table "game_log", and now I have the last inserted_id but don't
> > know what its primary_id is,
> > how can I "SELECT * FROM game_log WHERE this_table's_PK =
> > last_inserted_id"?
> >
> >
> >
> > _________________________________________________________________
> > 约会说不清地方?来试试微软地图最新msn互动功能!
> > http://ditu.live.com/?form=TL&swm=1
 		 	   		  
_________________________________________________________________
约会说不清地方?来试试微软地图最新msn互动功能!
http://ditu.live.com/?form=TL&swm=1
Thread
Event feature already working in Server 5.1.37Philipp Maske [Location Bretagne]24 Jan
  • RE: Event feature already working in Server 5.1.37Daevid Vincent26 Jan
    • Re: Event feature already working in Server 5.1.37Dan Nelson26 Jan
      • RE: Event feature already working in Server 5.1.37Daevid Vincent26 Jan
        • Re: Event feature already working in Server 5.1.37Shawn Green27 Jan
          • Re: Event feature already working in Server 5.1.37Wagner Bianchi27 Jan
          • RE: Event feature already working in Server 5.1.37Jerry Schwartz27 Jan
            • Re: Event feature already working in Server 5.1.37Johan De Meersman27 Jan
              • WAMP vs LAMPJerry Schwartz28 Jan
                • how to get the name of primary key ?曹凯1 Feb
                  • Re: how to get the name of primary key ?Thiyaghu CK1 Feb
                    • RE: how to get the name of primary key ?曹凯1 Feb
                  • Re: how to get the name of primary key ?Jesper Wisborg Krogh1 Feb
                    • RE: how to get the name of primary key ?曹凯1 Feb
                      • Re: how to get the name of primary key ?prabhat kumar1 Feb
        • Re: Event feature already working in Server 5.1.37Johan De Meersman27 Jan
          • Re: Event feature already working in Server 5.1.37Shawn Green27 Jan
            • Re: Event feature already working in Server 5.1.37Dan Nelson27 Jan
              • Re: Event feature already working in Server 5.1.37Johan De Meersman27 Jan
    • Re: Event feature already working in Server 5.1.37Joerg Bruehe26 Jan
    • Re: Event feature already working in Server 5.1.37Johan De Meersman26 Jan
Re: Event feature already working in Server 5.1.37Shawn Green26 Jan
RE: Event feature already working in Server 5.1.37John Daisley 27 Jan
RE: WAMP vs LAMPJerry Schwartz29 Jan
  • Re: WAMP vs LAMPWagner Bianchi29 Jan
    • RE: WAMP vs LAMPJerry Schwartz1 Feb
  • Re: WAMP vs LAMPShawn Green1 Feb
    • RE: WAMP vs LAMPJerry Schwartz1 Feb