View Single Post
Old 12-30-2012, 07:14 AM   PM User | #4
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,245
Thanks: 59
Thanked 3,998 Times in 3,967 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
By the by, a comment on you PHP/SQL code.
Code:
$query="SELECT * FROM staffinformation WHERE Team= 'Juventus'";
You have no ORDER BY clause in that SQL. So you are completely at the mercy of the database as to what order the records will be shown in. No, they will *NOT* always be shown in the order you think they will. If, for example, you deleted a record in the staffinformation table and later added a new record, the new record would likely appear in the place where the deleted record had appeared, almost surely out of your expected order.

It may be working now, but it's very very poor database practice to depend on it working forever.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is online now   Reply With Quote