Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 20th, 2007, 12:25 AM
Registered User
 
Join Date: Nov 2004
Location: manila, NCR, Philippines.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to vickr1z
Default SQL script auto_increment

Is it possible to add a prefixes zeros on a auto_increment field without addning new field. If ever how could I attain this goal?

More Power!
Reply With Quote
  #2 (permalink)  
Old January 22nd, 2007, 12:34 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: colombo, WP, Sri Lanka.
Posts: 481
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

hi,
this is the code

CREATE TABLE `tblname` (
         `fieldname` int(3) unsigned zerofill NOT NULL auto_increment,
         PRIMARY KEY (`fieldname`)
        )

surendran
(Anything is Possible)
http://ssuren.spaces.msn.com
Reply With Quote
  #3 (permalink)  
Old January 22nd, 2007, 12:59 AM
Registered User
 
Join Date: Nov 2004
Location: manila, NCR, Philippines.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to vickr1z
Default

Hi thanks for your help bro. Script works like a charm..

More Power!
Reply With Quote
  #4 (permalink)  
Old January 22nd, 2007, 08:22 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: colombo, WP, Sri Lanka.
Posts: 481
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

vickr1z,
No problem. you are welcome,

surendran
(Anything is Possible)
http://ssuren.spaces.msn.com
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How Run .sql Script file in MS SQL Server 2000? aarkaycee SQL Server 2000 5 October 12th, 2009 05:43 AM
sql script ttpdotcom BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 March 9th, 2008 03:08 PM
Mysql auto_increment reset elmb Beginning PHP 2 August 3rd, 2004 07:22 AM
Make an existing field auto_increment Mitch MySQL 1 April 6th, 2004 04:08 AM
MySQL AUTO_INCREMENT field fcamilo Beginning PHP 1 August 21st, 2003 06:29 PM



All times are GMT -4. The time now is 04:41 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.