How to tell if a field type is auto_increment
| From: | John L. Creed | Date: | Mon, 29 Jan 2007 22:06:12 +0000 |
| Subject: | How to tell if a field type is auto_increment | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-43007@lists.php.net to get a copy of this message | ||
I've been struggling to figure a way to determine if a mySql filed type is
auto inc.
Any ideas?
Iv'e written a function that will INSERT form data which has the exact field
names as the mysql table, thus looping through the table names and then
building a query string for the insert. However I'd like to skip a field
that's autoinc. That can be done if there's no hidden field in the form with
the same name. I've created another function that updates a table but only
with values in the http form that have changed, using the same logic as
above, except I have to have a hidden field of the autoinc field so I know
whcih row to update. Obviously the autoinc field won't be changed.
Thanks a million in advance.
--
Regards,
John L. Creed
pcExpressWay Consulting
*****************************************
dBASE Gold Charter Member 210
*****************************************
http://www.pcexpressway.com
*****************************************