Re: auto_increment $value
| From: | John Taylor-Johnston | Date: | Mon, 10 Mar 2003 21:41:11 +0000 |
| Subject: | Re: auto_increment $value | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-139038@lists.php.net to get a copy of this message | ||
Necessary, or at least cleaner, if there are less than 5 records in your database.
> Why don't you just use "select * from table order by id DESC limit 0,5"?
>
> I don't see any necessary to get the auto_increment value.
> > Anyone know how to get the auto_increment $value out of a mysql table.
> > I'm thinking it is in mysql_fetch_array but don't see how to get it.
> > > $SQL = "SELECT * FROM table ORDER BY id asc LIMIT $autoindex -5 ,5;";
> > > I would like to get the autoindex value of my table and use it in my
> SQL. Can I get the autoindex? :) How?