Matthew,
The convention I use goes as follows:
[ I am doing this without testing as I go so if something is wrong,
don't sue me :P ]
Lets say I have two tables...
PEOPLE
people_id (primary key)
people_namefirst
people_namelast
people_namemiddle
people_age
place_id (foreign key)
PLACE
place_id (primary key)
place_name
place_address
place_numberphone
place_numberfax
What I do is use [tablename]_[fieldname]. This convention makes SELECT
statements like this easy...
SELECT people.people_id,
people.people_namefirst,
place.place_id,
place.place_address
FROM people, place
WHERE people.place_id = place.place_id
AND place.place_name = 'IBM';
Otherwise, it would be difficult to differenciate between place_id (the
foreign key for the PEOPLE table) and place_id (the primary key for the
PLACE table).
-Jeremy
Email: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]