Field Names.

wxdqz

New Member
In the past I have always given each field of each table within a database a unique name so that there is no confusion and no need to specify the table. (Also make the conversion from table element to php variable consistant and simple :-).

Now I am thinking there are advantages of using the same field names repeatedly (i.e. ease of generating new forms for the new tables where the fieldnames are the same).

What are the more experienced coders preferences? Have you found a system particularly useful?

I was thinking of going with non unique field names, but making all the variables:

$table1_id = $myrow["table1.id"];
$anothertable_id = $myrow["anothertable.id"];
etc.

So, as a generalpolicy is it preferred to stay unique or standardize and use the tablenames?

Cheers,
Tim
 
Back
Top