So I can do something like "SELECT * FROM " . $tablename . "WHERE _rowid=" $id (I'm using PHP and the primary key is a unique integer column in each of the tables).
From: Egor Egorov <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: Primary keys
Date: Wed, 24 Mar 2004 13:28:58 +0200

"JOHN MEYER" <[EMAIL PROTECTED]> wrote:
> Is there a way to do a SQL Select and get a record without specifying the
> primary key. Example. I have two tables CANDLE and VOTIVES. Can I define
> a select that says "SELECT * FROM TABLE WHERE PRIMARY_KEY="...
>


No, You can't.
Only if PRIMARY or UNIQUE KEY consists of one integer column, you can refer to that column as _rowid:
http://www.mysql.com/doc/en/CREATE_TABLE.html




--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]


_________________________________________________________________
Find a broadband plan that fits. Great local deals on high-speed Internet access. https://broadband.msn.com/?pgmarket=en-us/go/onm00200360ave/direct/01/



-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to