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

Posts: 77
Name: Joe
Location: Oklahoma, USA
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
 
When You Register, These Ads Go Away!
     
Old 04-09-2007, 11:39 AM Re: mysql auto increment isn't setting right
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
Wireless Audio
Posts: 2,314
Name: Keith Marshall
Location: West Hartford, CT
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, 11:48 AM Re: mysql auto increment isn't setting right
chrishirst's Avatar
Super Moderator

Posts: 12,808
Location: Blackpool. UK
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!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-09-2007, 12:23 PM Re: mysql auto increment isn't setting right
SlayersOtaku's Avatar
Skilled Talker

Posts: 77
Name: Joe
Location: Oklahoma, USA
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, 12:28 PM Re: mysql auto increment isn't setting right
chrishirst's Avatar
Super Moderator

Posts: 12,808
Location: Blackpool. UK
signed or unsigned ?

viewing it in what ?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-09-2007, 04:11 PM Re: mysql auto increment isn't setting right
SlayersOtaku's Avatar
Skilled Talker

Posts: 77
Name: Joe
Location: Oklahoma, USA
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, 05:01 PM Re: mysql auto increment isn't setting right
Skilled Talker

Posts: 94
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 Template Monster WebAPI absolutely free! See a live Template Shop Demo
ChadR is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to mysql auto increment isn't setting right
 

Thread Tools

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

vB 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.14982 seconds with 13 queries