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.

PHP Forum


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



Freelance Jobs

Reply
Altering rows in mysql...
Old 04-02-2011, 09:36 AM Altering rows in mysql...
Brian07002's Avatar
Defies a Status

Posts: 2,162
Name: ...
Location: ...
Trades: 0
I am using a php script where I am adding categories, and each category has a number (auto incrementing). I added 40 categories, and duplicated the one of them, and deleted the category instead of editing it and changing the name. My question now is how can I fix it so that the category list is in order ( 40, 41, 42) instead of category 40, 42..

I believe it has to do with this:
Code:
ALTER TABLE theTableInQuestion AUTO_INCREMENT=1234
I know to change 'theTableInQuestion' to my table, but how to fix it for my case is what I need. I forget what will fix this.

Thank you guys!
Brian
__________________
Made2Own

Please login or register to view this content. Registration is FREE
Brian07002 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-02-2011, 09:50 AM Re: Altering rows in mysql...
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Why does it matter??
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-02-2011, 10:13 AM Re: Altering rows in mysql...
Brian07002's Avatar
Defies a Status

Posts: 2,162
Name: ...
Location: ...
Trades: 0
Quote:
Originally Posted by chrishirst View Post
Why does it matter??
I guess not to worry then. I guess that's why some invoicing programs (for example), the first customer is usually 10000 instead of just 1. I'll leave it be for now I guess.
__________________
Made2Own

Please login or register to view this content. Registration is FREE
Brian07002 is offline
Reply With Quote
View Public Profile
 
Old 04-02-2011, 03:01 PM Re: Altering rows in mysql...
lynxus's Avatar
Awesomeo-Maximo

Posts: 1,618
Location: UK
Trades: 1
If your invoicing your best bet is to use the unique row id + customerid + the invoice number as this make reading the numbers better later ( to find out what invoice number it is.. )

For example:
TestCustomerId = 9919
Rowid = 1234
Invoice number = 2 ( this is the 2nd time we have invoiced them )

123499192

Makes it easy to see later... ( well thats how i do it and i know others do also. )


( Ignore me, I noticed this was used as an example... )
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


lynxus is offline
Reply With Quote
View Public Profile Visit lynxus's homepage!
 
Reply     « Reply to Altering rows in mysql...
 

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.24212 seconds with 12 queries