[nycphp-talk] newbie question/confusion
Daniel Convissor
danielc at analysisandsolutions.com
Wed Feb 23 00:38:50 EST 2005
Joshua:
On Tue, Feb 22, 2005 at 11:10:22PM -0500, Freeman, Joshua wrote:
>
> So, 'id' in the 'state' table is linked to the 'gardens' table via
> that table's 'state_id' field.
Good job on "normalizing" your database. Suggestion: use the same column
names in each table for the key: state_id. It makes things easier to
join and is clearer.
> it on a web page, but, of course, I'm seeing the 'state_id' instead of
> either the 'state_abbreviation' or the 'state_name'.
Faber was on target.
My MySQL tutorial, while mainly geared toward how to install MySQL on
Windows, also includes SQL syntax tips:
http://www.analysisandsolutions.com/code/mybasic.htm
A later post mentioned your inquiry regarding inserting new gardens. When
accepting user input, make sure you carefully validate the information so
it won't permit "SQL injection" attacks or other corruptions/errors.
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
More information about the talk
mailing list