How to correct set MYSQL query to add row?
I like to set added MYSQL query to add row after last row.
How to do it as I have first field UUID and last two dattime in UNIX FORMAT.
INSERT INTO mytable
(id, myname, description, creat, modify) VALUES('UUID', '' ,'' ,'' ,'')
I'm not completely sure I understand your problem, are you asking how to set up an autoincrement primary key?
Would work to modify an existing field.
alter table `table name` modify `id field` int primary key auto_increment;
If you are using PHP please use the [PHP] and [/PHP] forum tags for highlighting...
The same applies to HTML and the forums [HTML][/HTML] tags.
1. I like to set added MYSQL query to add row after last row. Not EDIT...
2. first field UUID and last two dattime in UNIX FORMAT.
So, value should be for FIRST field UUID value
Description like URL:
Structure of table: id, myname, description, creat, modify
Last edited by toplisek; 03-24-2011 at 08:58 AM.
your first SQL Statement will insert/add a new row to your database table. Technically there is no row order to a Table only which page it's stored in.
If you table already has rows then a new row will be added to a page, either added to an existing page (if space) or added to a new sequential page.
This is the reason why we normally use a numbered column or record the date the record was create so we can query and retrieve the data in a particular order.
Scragar has given you an example on how to use a numbered column to allow for the quering of the data so you can clearly retrieve the last record inserted.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)