Forum Moderators: coopster
if i cant place a new record in the middle of other records, can anyone suggest an alternative way of defining a form's contents outside of the actual php file (i.e, using a table to describe a form application)...
will
no way to insert rows at a certain position in mySQL afaik. You can define a primary key with the auto_increment feature and order your query by this column descending to get the table "upside down". You might also take a closer look at the "tabindex" attribute in the various <FORM> input elements, which define the order the inputs get the focus when "tabbing" through the form.
Hope this helps a bit.
Regards
Markus
thanks for your help
will
I'm not concerned with primary keys and the efficacy of messing around with records, since the table will be static once it is created...
Well, (relational) databases are mainly all about primary keys, relationships of keys, indices and "messing" around with rows (records). You have no influence whatsoever on the internal storing order of the rows. The database enginge stores the rows in the order which is best practice for storing and retrieving purposes. So when you insert your rows in a certain order, you cannot rely on them being stored in that particular order for all times. SQL gives you total power over the order the rows are presented to you by keys and through the ORDER BY statement, which you indeed should make use of.
If you want your piece of data to remain static for all times, use a file. Filesystems are designed to keep your data in exactly the state you've put it in. MySQL is designed to act exactly as told to using SQL statements. Both work well and are fairly easy to handle.
Regards
Markus