|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Hi,
when I insert new data into a table, where is it gonna be, at the end or the beginning? If it is the end, how do i get it to put the new data at the beginning?? |
|
#2
|
|||
|
|||
|
The whole concept of relational databases is that the system is responsible for storing your data, you don't have to worry where or how it is stored.
However, when returning data from a query, you can sort data on one of the columns using "ORDER BY". This could give you the first or last records entered if the ORDER BY field is a timestamp. Or if you use an auto increment integer key in your table, you could get the last record entered by using this select statement: SELECT * FROM table WHERE id = LAST_INSERT_ID(); |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > INSERT?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|