Re: MySQL query question
| From: | Mike Eheler | Date: | Thu, 24 Jan 2002 23:47:40 +0000 |
| Subject: | Re: MySQL query question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-82006@lists.php.net to get a copy of this message | ||
Let's say you have this table, pseudo-coded:
TABLE table
tableid int auto_increment,
value text
;
You could run this query on it:
insert into table values ('','value');
And the id will be auto generated. Same would apply with:
inert into table (value) values ('value');
Mike
Phil Schwarzmann wrote:
Okay, so when I INSERT a row of information into a MySQL database, I don't want it to place it at the first empty row it finds....I want it to put it after the very last exsisting row. One of the fields of the database is an AUTO_INCREMENT type, so Im assuming Im gonna use that in the query. How would I write a query to do this?? THANKS!!!!!!!!!!!!!!!!!!!!!!-- At no time is freedom of speech more precious than when a man hits his thumb with a hammer. -- Marshall Lumsden