Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
mysql auto increment isn't setting right
Old 04-09-2007, 12:26 PM mysql auto increment isn't setting right
SlayersOtaku's Avatar
Skilled Talker

Posts: 77
Name: Joe
Location: Oklahoma, USA
Trades: 0
One of my MYSQL tables the auto increment changes to 2147483647 from 1. A quick google search said that number is = to myisam_max_sort_file_size.

My insert query looks like this.
PHP Code:
INSERT INTO issues (issue_datevolumeissuechurchactivecurrentVALUES ('".$issue_date."','".$_POST['issue']."','".$_POST['volume']."','".$_POST['church']."','".$_POST['active']."','".$_POST['current']."'
I'm pretty sure there isn't anything wrong with the query and it's all in the MYSQL table.
__________________

SlayersOtaku is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-09-2007, 12:39 PM Re: mysql auto increment isn't setting right
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,898
Name: Keith Marshall
Location: Connecticut
Trades: 0
Is that a table that once was filled and you deleted all the data? If so, the auto_increment value may still be set to the last increment number.

You can try to empty the table or reset the auto_increment number through phpMyAdmin or passing a query like: ALTER TABLE 'issues' AUTO_INCREMENT = 0
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 04-09-2007, 12:48 PM Re: mysql auto increment isn't setting right
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,520
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
2147483647 is the largest positive number that can be stored in a signed integer field.

What it displays as may well depend on what you are viewing it in.

so is it a column type of signed integer?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-09-2007, 01:23 PM Re: mysql auto increment isn't setting right
SlayersOtaku's Avatar
Skilled Talker

Posts: 77
Name: Joe
Location: Oklahoma, USA
Trades: 0
I created a new table based on the same information and the problem still occurs. The auto increment table is set to INT.
__________________

SlayersOtaku is offline
Reply With Quote
View Public Profile
 
Old 04-09-2007, 01:28 PM Re: mysql auto increment isn't setting right
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,520
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
signed or unsigned ?

viewing it in what ?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-09-2007, 05:11 PM Re: mysql auto increment isn't setting right
SlayersOtaku's Avatar
Skilled Talker

Posts: 77
Name: Joe
Location: Oklahoma, USA
Trades: 0
I'm viewing it in PHPMyAdmin so I do not know if it is signed or not
__________________

SlayersOtaku is offline
Reply With Quote
View Public Profile
 
Old 04-09-2007, 06:01 PM Re: mysql auto increment isn't setting right
Skilled Talker

Posts: 94
Trades: 0
You can edit the field and you can set aqn option of unsigned. You can also edit the table in PHPmyAdmin to reset the AutoIncrement value. I think it's under operations or something.
__________________
Sell Templates? Try our
Please login or register to view this content. Registration is FREE
! See a live
Please login or register to view this content. Registration is FREE
ChadR is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to mysql auto increment isn't setting right
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.19134 seconds with 12 queries